[PATCH 2.6.11] 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]> diff -uprN a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h --- a/drivers/block/aoe/aoe.h 2005-03-10 11:59:55.0 -0500 +++ b/drivers/block/aoe/aoe.h 2005-03-10 12:19:04.0 -0500 @@ -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) diff -uprN a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c --- a/drivers/block/aoe/aoecmd.c2005-03-10 11:59:55.0 -0500 +++ b/drivers/block/aoe/aoecmd.c2005-03-10 12:19:04.0 -0500 @@ -577,7 +577,7 @@ aoecmd_cfg_rsp(struct sk_buff *skb) 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 @@ aoecmd_cfg_rsp(struct sk_buff *skb) } 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; } -- Ed L. Cashin <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.11] 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] diff -uprN a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h --- a/drivers/block/aoe/aoe.h 2005-03-10 11:59:55.0 -0500 +++ b/drivers/block/aoe/aoe.h 2005-03-10 12:19:04.0 -0500 @@ -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) diff -uprN a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c --- a/drivers/block/aoe/aoecmd.c2005-03-10 11:59:55.0 -0500 +++ b/drivers/block/aoe/aoecmd.c2005-03-10 12:19:04.0 -0500 @@ -577,7 +577,7 @@ aoecmd_cfg_rsp(struct sk_buff *skb) 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 @@ aoecmd_cfg_rsp(struct sk_buff *skb) } 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; } -- Ed L. Cashin [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.11] aoe [1/12]: remove too-low cap on minor number
Greg KH <[EMAIL PROTECTED]> writes: > I've applied 11 of these 12 patches (the one from Randy was already > included) to my trees. Those haven't gone to the lkml yet. I'll post them through gmane. (The original postings never made it to the list, and I can't get in touch with the lkml admins, but gmane should work.) -- Ed L Cashin <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.11] aoe [1/12]: remove too-low cap on minor number
Greg KH [EMAIL PROTECTED] writes: I've applied 11 of these 12 patches (the one from Randy was already included) to my trees. Those haven't gone to the lkml yet. I'll post them through gmane. (The original postings never made it to the list, and I can't get in touch with the lkml admins, but gmane should work.) -- Ed L Cashin [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.11] aoe [1/12]: remove too-low cap on minor number
I've applied 11 of these 12 patches (the one from Randy was already included) to my trees. thanks, greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.11] aoe [1/12]: remove too-low cap on minor number
I've applied 11 of these 12 patches (the one from Randy was already included) to my trees. thanks, greg k-h - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/