tree a54d1b213653dc992a1700a96b5805b72e687028
parent c0698f2f6e4839ce9463ce731c892993215ea067
author [EMAIL PROTECTED] <[EMAIL PROTECTED]> Tue, 19 Apr 2005 12:00:17 -0700
committer Greg KH <[EMAIL PROTECTED]> Tue, 19 Apr 2005 12:00:17 -0700

[PATCH] aoe 1/12: remove too-low cap on minor number

remove too-low cap on minor number

Signed-off-by: Ed L. Cashin <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>



 block/aoe/aoe.h    |    5 +++++
 block/aoe/aoecmd.c |    9 +++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

Index: drivers/block/aoe/aoe.h
===================================================================
--- b05fc8a950ace937460212e996441e4c05a227f6/drivers/block/aoe/aoe.h  
(mode:100644 sha1:db78f826d40c5beb3ce3254954d0e938f3f774c4)
+++ a54d1b213653dc992a1700a96b5805b72e687028/drivers/block/aoe/aoe.h  
(mode:100644 sha1:551dd8e5b14b2a71e590f6419d83f708de034d69)
@@ -2,9 +2,14 @@
 #define VERSION "5"
 #define AOE_MAJOR 152
 #define DEVICE_NAME "aoe"
+
+/* set AOE_PARTITIONS to 1 to use whole-disks only
+ * default is 16, which is 15 partitions plus the whole disk
+ */
 #ifndef AOE_PARTITIONS
 #define AOE_PARTITIONS 16
 #endif
+
 #define SYSMINOR(aoemajor, aoeminor) ((aoemajor) * 10 + (aoeminor))
 #define AOEMAJOR(sysminor) ((sysminor) / 10)
 #define AOEMINOR(sysminor) ((sysminor) % 10)
Index: drivers/block/aoe/aoecmd.c
===================================================================
--- b05fc8a950ace937460212e996441e4c05a227f6/drivers/block/aoe/aoecmd.c  
(mode:100644 sha1:fb6d942a456561d18ba971cf883dedec4942dc12)
+++ a54d1b213653dc992a1700a96b5805b72e687028/drivers/block/aoe/aoecmd.c  
(mode:100644 sha1:1b711a52dd252fe25606814e21d709271607e9b1)
@@ -577,7 +577,7 @@
        struct aoe_cfghdr *ch;
        ulong flags, bufcnt, sysminor, aoemajor;
        struct sk_buff *sl;
-       enum { MAXFRAMES = 8, MAXSYSMINOR = 255 };
+       enum { MAXFRAMES = 8 };
 
        h = (struct aoe_hdr *) skb->mac.raw;
        ch = (struct aoe_cfghdr *) (h+1);
@@ -594,9 +594,10 @@
        }
 
        sysminor = SYSMINOR(aoemajor, h->minor);
-       if (sysminor > MAXSYSMINOR) {
-               printk(KERN_INFO "aoe: aoecmd_cfg_rsp: sysminor %ld too "
-                       "large\n", sysminor);
+       if (sysminor * AOE_PARTITIONS + AOE_PARTITIONS > MINORMASK) {
+               printk(KERN_INFO
+                       "aoe: e%ld.%d: minor number too large\n", 
+                       aoemajor, (int) h->minor);
                return;
        }
 
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to