linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] block/ub.c: Increase number of partitions for usb storage
       [not found] <mailman.1146575400.25877.linux-kernel2news@redhat.com>
@ 2006-05-03  3:24 ` Pete Zaitcev
  2006-05-11  0:16   ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Pete Zaitcev @ 2006-05-03  3:24 UTC (permalink / raw)
  To: Hans A Eide; +Cc: zaitcev, linux-kernel

On Tue, 2 May 2006 14:59:52 +0200, Hans A Eide <haeide@usit.uio.no> wrote:

> I do backups to external USB storage and hit the 8 partitions limit  
> of ub.c
> This could also be a problem for others (HFS+ formatted iPods?)

It was a bad mistake in retrospect. I limited ub to 8 partitions
because I wanted to fit 26 devices into 8 bits of minor.

> Any reason for not increasing the partitions limit to 16?

Doing so would not be compatible for systems which do not run udevd.
Linus forbade such changes, and I agree. So, if we strongly needed
ub to go beyond 1+7 partitions, we would need some kind of a remapping
scheme. I have to discuss this with Greg or Harald. Making dis-
contiguous nodes is easy with mknod, but I do not know if udev
supports it.

> +++ drivers/block/ub.c  2006-04-30 13:37:34.000000000 +0200
> @@ -113,7 +113,7 @@
> /*
>    */
> -#define UB_PARTS_PER_LUN      8
> +#define UB_PARTS_PER_LUN      16
> #define UB_MAX_CDB_SIZE      16                /* Corresponds to Bulk */

Your mailer corrupted your patch. The attached ought to work better,
but it's a subject to aforementioned compatibility problems.

-- Pete

--- linux-2.6.17-rc2/drivers/block/ub.c	2006-04-23 21:05:39.000000000 -0700
+++ linux-2.6.17-rc2-lem/drivers/block/ub.c	2006-05-02 20:14:15.000000000 -0700
@@ -113,7 +109,7 @@
 /*
  */
 
-#define UB_PARTS_PER_LUN      8
+#define UB_PARTS_PER_LUN     16
 
 #define UB_MAX_CDB_SIZE      16		/* Corresponds to Bulk */
 
diff -urp -X dontdiff linux-2.6.17-rc2/Documentation/devices.txt linux-2.6.17-rc2-lem/Documentation/devices.txt
--- linux-2.6.17-rc2/Documentation/devices.txt	2006-01-03 20:02:51.000000000 -0800
+++ linux-2.6.17-rc2-lem/Documentation/devices.txt	2006-05-02 20:13:17.000000000 -0700
@@ -2557,10 +2557,10 @@ Your cooperation is appreciated.
 		 66 = /dev/usb/cpad0	Synaptics cPad (mouse/LCD)
 
 180 block	USB block devices
-		0 = /dev/uba		First USB block device
-		8 = /dev/ubb		Second USB block device
-		16 = /dev/ubc		Thrid USB block device
-		...
+		  0 = /dev/uba		First USB block device
+		 16 = /dev/ubb		Second USB block device
+		 32 = /dev/ubc		Third USB block device
+		    ...
 
 181 char	Conrad Electronic parallel port radio clocks
 		  0 = /dev/pcfclock0	First Conrad radio clock

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] block/ub.c: Increase number of partitions for usb storage
  2006-05-03  3:24 ` [PATCH] block/ub.c: Increase number of partitions for usb storage Pete Zaitcev
@ 2006-05-11  0:16   ` Greg KH
  2006-05-11  8:24     ` Hans A Eide
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2006-05-11  0:16 UTC (permalink / raw)
  To: Pete Zaitcev; +Cc: Hans A Eide, linux-kernel

On Tue, May 02, 2006 at 08:24:12PM -0700, Pete Zaitcev wrote:
> On Tue, 2 May 2006 14:59:52 +0200, Hans A Eide <haeide@usit.uio.no> wrote:
> 
> > I do backups to external USB storage and hit the 8 partitions limit  
> > of ub.c
> > This could also be a problem for others (HFS+ formatted iPods?)
> 
> It was a bad mistake in retrospect. I limited ub to 8 partitions
> because I wanted to fit 26 devices into 8 bits of minor.
> 
> > Any reason for not increasing the partitions limit to 16?
> 
> Doing so would not be compatible for systems which do not run udevd.
> Linus forbade such changes, and I agree. So, if we strongly needed
> ub to go beyond 1+7 partitions, we would need some kind of a remapping
> scheme. I have to discuss this with Greg or Harald. Making dis-
> contiguous nodes is easy with mknod, but I do not know if udev
> supports it.

udev can handle it just fine, as it just looks at the sysfs "dev" file
to get the major:minor numbers.  It knows nothing about "ranges" :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] block/ub.c: Increase number of partitions for usb storage
  2006-05-11  0:16   ` Greg KH
@ 2006-05-11  8:24     ` Hans A Eide
  0 siblings, 0 replies; 4+ messages in thread
From: Hans A Eide @ 2006-05-11  8:24 UTC (permalink / raw)
  To: Greg KH; +Cc: Pete Zaitcev, linux-kernel



On 11. mai. 2006, at 02:16, Greg KH wrote:

> On Tue, May 02, 2006 at 08:24:12PM -0700, Pete Zaitcev wrote:
>> On Tue, 2 May 2006 14:59:52 +0200, Hans A Eide  
>> <haeide@usit.uio.no> wrote:
>>
>>> I do backups to external USB storage and hit the 8 partitions limit
>>> of ub.c
>>> This could also be a problem for others (HFS+ formatted iPods?)
>>
>> It was a bad mistake in retrospect. I limited ub to 8 partitions
>> because I wanted to fit 26 devices into 8 bits of minor.
>>
>>> Any reason for not increasing the partitions limit to 16?
>>
>> Doing so would not be compatible for systems which do not run udevd.
>> Linus forbade such changes, and I agree. So, if we strongly needed
>> ub to go beyond 1+7 partitions, we would need some kind of a  
>> remapping
>> scheme. I have to discuss this with Greg or Harald. Making dis-
>> contiguous nodes is easy with mknod, but I do not know if udev
>> supports it.
>
> udev can handle it just fine, as it just looks at the sysfs "dev" file
> to get the major:minor numbers.  It knows nothing about "ranges" :)

I can confirm this in practice. Good magic :-)


Hans



--
+                                                                      +
     Hans A Eide, PhD.                  Senior Analyst, USIT
    haeide@usit.uio.no             University of Oslo, Norway
+                                                                      +



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] block/ub.c: Increase number of partitions for usb storage
@ 2006-05-02 12:59 Hans A Eide
  0 siblings, 0 replies; 4+ messages in thread
From: Hans A Eide @ 2006-05-02 12:59 UTC (permalink / raw)
  To: linux-kernel


Hi,

I do backups to external USB storage and hit the 8 partitions limit  
of ub.c
This could also be a problem for others (HFS+ formatted iPods?)

Any reason for not increasing the partitions limit to 16?

Thanks,

Hans

diff -u drivers/block/ub.c.orig drivers/block/ub.c
--- drivers/block/ub.c.orig     2006-05-02 09:16:22.000000000 +0200
+++ drivers/block/ub.c  2006-04-30 13:37:34.000000000 +0200
@@ -113,7 +113,7 @@
/*
   */
-#define UB_PARTS_PER_LUN      8
+#define UB_PARTS_PER_LUN      16
#define UB_MAX_CDB_SIZE      16                /* Corresponds to Bulk */



--
Hans A. Eide
University of Oslo, Norway



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-05-11  8:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1146575400.25877.linux-kernel2news@redhat.com>
2006-05-03  3:24 ` [PATCH] block/ub.c: Increase number of partitions for usb storage Pete Zaitcev
2006-05-11  0:16   ` Greg KH
2006-05-11  8:24     ` Hans A Eide
2006-05-02 12:59 Hans A Eide

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).