Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-23 Thread Andrew Morton
> On Fri, 23 Feb 2007 14:52:29 -0600 "Mike Miller (OS Dev)" <[EMAIL PROTECTED]> > wrote: > On Thu, Feb 22, 2007 at 04:06:41PM -0600, James Bottomley wrote: > > On Thu, 2007-02-22 at 16:02 -0600, Mike Miller (OS Dev) wrote: > > > Will this patch for my patch work for now? > > > > Yes, I think

[Patch 1/2] cciss: fix for 2TB support (again)

2007-02-23 Thread Mike Miller (OS Dev)
Patch 1/2 This patch changes the constant 0x to 0xULL to prevent sign extension. Previously: This patch changes the way we determine if a logical volume is larger than 2TB. The original test looked for a total_size of 0. Originally we added 1 to the total_size. That would

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-23 Thread Mike Miller (OS Dev)
On Thu, Feb 22, 2007 at 04:06:41PM -0600, James Bottomley wrote: > On Thu, 2007-02-22 at 16:02 -0600, Mike Miller (OS Dev) wrote: > > Will this patch for my patch work for now? > > Yes, I think that should be fine ... it's only a theoretical worry; at > the moment sector_t is unsigned ... but

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-23 Thread Mike Miller (OS Dev)
On Thu, Feb 22, 2007 at 04:06:41PM -0600, James Bottomley wrote: On Thu, 2007-02-22 at 16:02 -0600, Mike Miller (OS Dev) wrote: Will this patch for my patch work for now? Yes, I think that should be fine ... it's only a theoretical worry; at the moment sector_t is unsigned ... but just in

[Patch 1/2] cciss: fix for 2TB support (again)

2007-02-23 Thread Mike Miller (OS Dev)
Patch 1/2 This patch changes the constant 0x to 0xULL to prevent sign extension. Previously: This patch changes the way we determine if a logical volume is larger than 2TB. The original test looked for a total_size of 0. Originally we added 1 to the total_size. That would

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-23 Thread Andrew Morton
On Fri, 23 Feb 2007 14:52:29 -0600 Mike Miller (OS Dev) [EMAIL PROTECTED] wrote: On Thu, Feb 22, 2007 at 04:06:41PM -0600, James Bottomley wrote: On Thu, 2007-02-22 at 16:02 -0600, Mike Miller (OS Dev) wrote: Will this patch for my patch work for now? Yes, I think that should be fine

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-22 Thread James Bottomley
On Thu, 2007-02-22 at 16:02 -0600, Mike Miller (OS Dev) wrote: > Will this patch for my patch work for now? Yes, I think that should be fine ... it's only a theoretical worry; at the moment sector_t is unsigned ... but just in case. James - To unsubscribe from this list: send the line

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-22 Thread Mike Miller (OS Dev)
On Thu, Feb 22, 2007 at 03:41:24PM -0600, James Bottomley wrote: > On Thu, 2007-02-22 at 13:24 -0800, Andrew Morton wrote: > > > On Thu, 22 Feb 2007 10:51:23 -0600 "Mike Miller (OS Dev)" <[EMAIL > > > PROTECTED]> wrote: > > > On Wed, Feb 21, 2007 at 07:14:27PM -0800, Andrew Morton wrote: > > > >

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-22 Thread James Bottomley
On Thu, 2007-02-22 at 13:24 -0800, Andrew Morton wrote: > > On Thu, 22 Feb 2007 10:51:23 -0600 "Mike Miller (OS Dev)" <[EMAIL > > PROTECTED]> wrote: > > On Wed, Feb 21, 2007 at 07:14:27PM -0800, Andrew Morton wrote: > > > On Wed, 21 Feb 2007 15:10:39 -0600 "Mike Miller (OS Dev)" <[EMAIL > > >

RE: [Patch 1/2] cciss: fix for 2TB support

2007-02-22 Thread Miller, Mike (OS Dev)
> -Original Message- > From: Mike Miller (OS Dev) [mailto:[EMAIL PROTECTED] > > Andrew, > Using this test program and changing the type of x to int, > long, long long signed and unsigned the comparison always > worked on x86, x86_64, and ia64. It looks to me like the > comparsion

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-22 Thread Andrew Morton
> On Thu, 22 Feb 2007 10:51:23 -0600 "Mike Miller (OS Dev)" <[EMAIL PROTECTED]> > wrote: > On Wed, Feb 21, 2007 at 07:14:27PM -0800, Andrew Morton wrote: > > On Wed, 21 Feb 2007 15:10:39 -0600 "Mike Miller (OS Dev)" <[EMAIL > > PROTECTED]> wrote: > > > > > Patch 1/2 > > > + if

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-22 Thread Mike Miller (OS Dev)
On Wed, Feb 21, 2007 at 07:14:27PM -0800, Andrew Morton wrote: > > > > + if (total_size == 0x) { > > I seem to remember having already questioned this. total_size is sector_t, > which > can be either 32-bit or 64-bit. Are you sure that comparison works as > intended in both cases? >

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-22 Thread Mike Miller (OS Dev)
On Wed, Feb 21, 2007 at 07:14:27PM -0800, Andrew Morton wrote: > On Wed, 21 Feb 2007 15:10:39 -0600 "Mike Miller (OS Dev)" <[EMAIL PROTECTED]> > wrote: > > > Patch 1/2 > > > > This patch changes the way we determine if a logical volume is larger than > > 2TB. The > > original test looked for a

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-22 Thread Mike Miller (OS Dev)
On Wed, Feb 21, 2007 at 07:14:27PM -0800, Andrew Morton wrote: On Wed, 21 Feb 2007 15:10:39 -0600 Mike Miller (OS Dev) [EMAIL PROTECTED] wrote: Patch 1/2 This patch changes the way we determine if a logical volume is larger than 2TB. The original test looked for a total_size of 0.

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-22 Thread Mike Miller (OS Dev)
On Wed, Feb 21, 2007 at 07:14:27PM -0800, Andrew Morton wrote: + if (total_size == 0x) { I seem to remember having already questioned this. total_size is sector_t, which can be either 32-bit or 64-bit. Are you sure that comparison works as intended in both cases? +

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-22 Thread Andrew Morton
On Thu, 22 Feb 2007 10:51:23 -0600 Mike Miller (OS Dev) [EMAIL PROTECTED] wrote: On Wed, Feb 21, 2007 at 07:14:27PM -0800, Andrew Morton wrote: On Wed, 21 Feb 2007 15:10:39 -0600 Mike Miller (OS Dev) [EMAIL PROTECTED] wrote: Patch 1/2 + if (total_size == 0x) {

RE: [Patch 1/2] cciss: fix for 2TB support

2007-02-22 Thread Miller, Mike (OS Dev)
-Original Message- From: Mike Miller (OS Dev) [mailto:[EMAIL PROTECTED] Andrew, Using this test program and changing the type of x to int, long, long long signed and unsigned the comparison always worked on x86, x86_64, and ia64. It looks to me like the comparsion will

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-22 Thread James Bottomley
On Thu, 2007-02-22 at 13:24 -0800, Andrew Morton wrote: On Thu, 22 Feb 2007 10:51:23 -0600 Mike Miller (OS Dev) [EMAIL PROTECTED] wrote: On Wed, Feb 21, 2007 at 07:14:27PM -0800, Andrew Morton wrote: On Wed, 21 Feb 2007 15:10:39 -0600 Mike Miller (OS Dev) [EMAIL PROTECTED] wrote:

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-22 Thread Mike Miller (OS Dev)
On Thu, Feb 22, 2007 at 03:41:24PM -0600, James Bottomley wrote: On Thu, 2007-02-22 at 13:24 -0800, Andrew Morton wrote: On Thu, 22 Feb 2007 10:51:23 -0600 Mike Miller (OS Dev) [EMAIL PROTECTED] wrote: On Wed, Feb 21, 2007 at 07:14:27PM -0800, Andrew Morton wrote: On Wed, 21 Feb

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-22 Thread James Bottomley
On Thu, 2007-02-22 at 16:02 -0600, Mike Miller (OS Dev) wrote: Will this patch for my patch work for now? Yes, I think that should be fine ... it's only a theoretical worry; at the moment sector_t is unsigned ... but just in case. James - To unsubscribe from this list: send the line

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-21 Thread Andrew Morton
On Wed, 21 Feb 2007 15:10:39 -0600 "Mike Miller (OS Dev)" <[EMAIL PROTECTED]> wrote: > Patch 1/2 > > This patch changes the way we determine if a logical volume is larger than > 2TB. The > original test looked for a total_size of 0. Originally we added 1 to the > total_size. > That would make

[Patch 1/2] cciss: fix for 2TB support

2007-02-21 Thread Mike Miller (OS Dev)
Patch 1/2 This patch changes the way we determine if a logical volume is larger than 2TB. The original test looked for a total_size of 0. Originally we added 1 to the total_size. That would make our read_capacity return size 0 for >2TB lv's. We assumed that we could not have a lv size of 0 so

[Patch 1/2] cciss: fix for 2TB support

2007-02-21 Thread Mike Miller (OS Dev)
Patch 1/2 This patch changes the way we determine if a logical volume is larger than 2TB. The original test looked for a total_size of 0. Originally we added 1 to the total_size. That would make our read_capacity return size 0 for 2TB lv's. We assumed that we could not have a lv size of 0 so

Re: [Patch 1/2] cciss: fix for 2TB support

2007-02-21 Thread Andrew Morton
On Wed, 21 Feb 2007 15:10:39 -0600 Mike Miller (OS Dev) [EMAIL PROTECTED] wrote: Patch 1/2 This patch changes the way we determine if a logical volume is larger than 2TB. The original test looked for a total_size of 0. Originally we added 1 to the total_size. That would make our