2.4.17 fix for loop driver to support 256 devices

From: Heinz J . Mauelshagen (mauelshagen@sistina.com)
Date: Mon Feb 18 2002 - 06:22:21 EST


While faking large volume groups a minor flaw in the loop driver showed up,
which fails creating the maximum of 256 devices.

The followong patch against 2.4.17 fixes that here.

diff -u linux-2.4.17.orig/drivers/block/loop.c linux-2.4.17/drivers/block/loop.c
--- linux-2.4.17.orig/drivers/block/loop.c Fri Dec 21 18:41:53 2001
+++ linux-2.4.17/drivers/block/loop.c Mon Feb 18 12:23:32 2002
@@ -36,6 +36,9 @@
  * Al Viro too.
  * Jens Axboe <axboe@suse.de>, Nov 2000
  *
+ * Support up to 256 loop devices
+ * Heinz Mauelshagen <mge@sistina.com>, Feb 2002
+ *
  * Still To Fix:
  * - Advisory locking is ignored here.
  * - Should use an own CAP_* category instead of CAP_SYS_ADMIN
@@ -965,7 +968,7 @@
  * And now the modules code and kernel interface.
  */
 MODULE_PARM(max_loop, "i");
-MODULE_PARM_DESC(max_loop, "Maximum number of loop devices (1-255)");
+MODULE_PARM_DESC(max_loop, "Maximum number of loop devices (1-256)");
 MODULE_LICENSE("GPL");

 int loop_register_transfer(struct loop_func_table *funcs)
@@ -1001,9 +1004,9 @@
 {
        int i;

- if ((max_loop < 1) || (max_loop > 255)) {
+ if ((max_loop < 1) || (max_loop > 256)) {
                printk(KERN_WARNING "loop: invalid max_loop (must be between"
- " 1 and 255), using default (8)\n");
+ " 1 and 256), using default (8)\n");
                max_loop = 8;
        }

-- 

Regards, Heinz -- The LVM Guy --

*** Software bugs are stupid. Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen Sistina Software Inc. Senior Consultant/Developer Am Sonnenhang 11 56242 Marienrachdorf Germany Mauelshagen@Sistina.com +49 2626 141200 FAX 924446 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:13 EST