Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Enable partitions for lguest block device

The lguest block device only requests one minor, which means
partitions don't work (eg "root=/dev/lgba1").

Let's follow the crowd and ask for 16.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Rusty Russell and committed by
Linus Torvalds
9ef7ad22 56616ebd

+6 -3
+6 -3
drivers/block/lguest_blk.c
··· 308 308 } 309 309 310 310 /* This allocates a "struct gendisk" where we pack all the information 311 - * about the disk which the rest of Linux sees. We ask for one minor 312 - * number; I do wonder if we should be asking for more. */ 313 - bd->disk = alloc_disk(1); 311 + * about the disk which the rest of Linux sees. The argument is the 312 + * number of minor devices desired: we need one minor for the main 313 + * disk, and one for each partition. Of course, we can't possibly know 314 + * how many partitions are on the disk (add_disk does that). 315 + */ 316 + bd->disk = alloc_disk(16); 314 317 if (!bd->disk) { 315 318 err = -ENOMEM; 316 319 goto out_unregister_blkdev;