Commit:     9ef7ad22965fcd817b20c1332286f02362266534
Parent:     56616ebd0e49b7e5c67a19ca1d96e8ec382bcacf
Author:     Rusty Russell <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 17 14:05:27 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Aug 18 09:45:51 2007 -0700

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/block/lguest_blk.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/block/lguest_blk.c b/drivers/block/lguest_blk.c
index 93e3c40..160cf14 100644
--- a/drivers/block/lguest_blk.c
+++ b/drivers/block/lguest_blk.c
@@ -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;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to