Skip to content

Commit

Permalink
Enable partitions for lguest block device
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rustyrussell authored and Linus Torvalds committed Aug 18, 2007
1 parent 56616eb commit 9ef7ad2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/block/lguest_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,12 @@ static int lguestblk_probe(struct lguest_device *lgdev)
}

/* This allocates a "struct gendisk" where we pack all the information
* about the disk which the rest of Linux sees. We ask for one minor
* number; I do wonder if we should be asking for more. */
bd->disk = alloc_disk(1);
* about the disk which the rest of Linux sees. The argument is the
* number of minor devices desired: we need one minor for the main
* disk, and one for each partition. Of course, we can't possibly know
* how many partitions are on the disk (add_disk does that).
*/
bd->disk = alloc_disk(16);
if (!bd->disk) {
err = -ENOMEM;
goto out_unregister_blkdev;
Expand Down

0 comments on commit 9ef7ad2

Please sign in to comment.