Re: [PATCH] USB enclosures seem to require read(16) with >2TB drives

2012-11-12 Thread Alan Stern
On Mon, 12 Nov 2012, Paolo Bonzini wrote: > Il 12/11/2012 16:10, James Bottomley ha scritto: > >> Actually it only turns it on for large capacity drives, as said in the > >> comment. sdp->force_read_16 only matters for >2TB drives: > > > > If you follow the discussion, we'll need to turn it on

Re: [PATCH] USB enclosures seem to require read(16) with >2TB drives

2012-11-12 Thread Paolo Bonzini
Il 12/11/2012 16:10, James Bottomley ha scritto: >> Actually it only turns it on for large capacity drives, as said in the >> comment. sdp->force_read_16 only matters for >2TB drives: > > If you follow the discussion, we'll need to turn it on for some drives > regardless of size. Even if the tw

Re: [PATCH] USB enclosures seem to require read(16) with >2TB drives

2012-11-12 Thread James Bottomley
On Mon, 2012-11-12 at 10:01 -0500, Jason J. Herne wrote: > > Any reason not to do this always on >2TB drives, which basically means > > changing this: > > > > - } else if (block > 0x) { > > + } else if (sdkp->capacity > 0x) { > > > > and nothing else? > > This was the i

Re: [PATCH] USB enclosures seem to require read(16) with >2TB drives

2012-11-12 Thread Jason J. Herne
On Mon, Nov 12, 2012 at 10:10 AM, James Bottomley wrote: > On Mon, 2012-11-12 at 15:31 +0100, Paolo Bonzini wrote: >> Il 12/11/2012 12:33, James Bottomley ha scritto: >> > On Fri, 2012-11-09 at 11:08 -0500, Jason J. Herne wrote: >> >> diff --git a/drivers/usb/storage/scsiglue.c >> >> b/drivers/usb

Re: [PATCH] USB enclosures seem to require read(16) with >2TB drives

2012-11-12 Thread James Bottomley
On Mon, 2012-11-12 at 15:31 +0100, Paolo Bonzini wrote: > Il 12/11/2012 12:33, James Bottomley ha scritto: > > On Fri, 2012-11-09 at 11:08 -0500, Jason J. Herne wrote: > >> diff --git a/drivers/usb/storage/scsiglue.c > >> b/drivers/usb/storage/scsiglue.c > >> index 13b8bcd..6ff785e 100644 > >> ---

Re: [PATCH] USB enclosures seem to require read(16) with >2TB drives

2012-11-12 Thread Jason J. Herne
On Mon, Nov 12, 2012 at 9:31 AM, Paolo Bonzini wrote: > Il 12/11/2012 12:33, James Bottomley ha scritto: >> On Fri, 2012-11-09 at 11:08 -0500, Jason J. Herne wrote: >>> diff --git a/drivers/usb/storage/scsiglue.c >>> b/drivers/usb/storage/scsiglue.c >>> index 13b8bcd..6ff785e 100644 >>> --- a/driv

Re: [PATCH] USB enclosures seem to require read(16) with >2TB drives

2012-11-12 Thread Paolo Bonzini
Il 12/11/2012 12:33, James Bottomley ha scritto: > On Fri, 2012-11-09 at 11:08 -0500, Jason J. Herne wrote: >> diff --git a/drivers/usb/storage/scsiglue.c >> b/drivers/usb/storage/scsiglue.c >> index 13b8bcd..6ff785e 100644 >> --- a/drivers/usb/storage/scsiglue.c >> +++ b/drivers/usb/storage/scsigl

Re: [PATCH] USB enclosures seem to require read(16) with >2TB drives

2012-11-12 Thread James Bottomley
On Fri, 2012-11-09 at 11:08 -0500, Jason J. Herne wrote: > diff --git a/drivers/usb/storage/scsiglue.c > b/drivers/usb/storage/scsiglue.c > index 13b8bcd..6ff785e 100644 > --- a/drivers/usb/storage/scsiglue.c > +++ b/drivers/usb/storage/scsiglue.c > @@ -251,6 +251,11 @@ static int slave_configure(s

Re: [PATCH] USB enclosures seem to require read(16) with >2TB drives

2012-11-12 Thread James Bottomley
On Fri, 2012-11-09 at 16:33 +, Elliott, Robert (Server Storage) wrote: > I recommend broadening this patch. T10 is discussing making READ > (10), WRITE (10), etc. obsolete in SBC-4 in favor of their 16-byte CDB > counterparts. > > The algorithm should be: > 1. During discovery, determine if

Re: [PATCH] USB enclosures seem to require read(16) with >2TB drives

2012-11-12 Thread Stefan Richter
On Nov 11 Stefan Richter wrote: > On Nov 09 Elliott, Robert (Server Storage) wrote: > > I recommend broadening this patch. T10 is discussing making READ (10), > > WRITE (10), etc. obsolete in SBC-4 in favor of their 16-byte CDB > > counterparts. > > > > The algorithm should be: > > 1. During

Re: [PATCH] USB enclosures seem to require read(16) with >2TB drives

2012-11-11 Thread Stefan Richter
On Nov 09 Elliott, Robert (Server Storage) wrote: > I recommend broadening this patch. T10 is discussing making READ (10), WRITE > (10), etc. obsolete in SBC-4 in favor of their 16-byte CDB counterparts. > > The algorithm should be: > 1. During discovery, determine if 16-byte CDBs are supporte

RE: [PATCH] USB enclosures seem to require read(16) with >2TB drives

2012-11-09 Thread Elliott, Robert (Server Storage)
nal Message- From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi-ow...@vger.kernel.org] On Behalf Of Jason J. Herne Sent: Friday, November 09, 2012 9:08 AM To: linux-scsi@vger.kernel.org Cc: linux-...@vger.kernel.org; st...@rowland.harvard.edu; Jason J. Herne Subject: [PATCH] USB enclosures se

Re: USB enclosures seem to require read(16) with >2TB drives

2012-11-09 Thread Alan Stern
On Fri, 9 Nov 2012, Jason J. Herne wrote: > Hello, I've noticed Linux seems to have issues with external USB > enclosures containing drives > 2 TB. The USB mass storage driver > apparently emulates a SCSI device and sends a read/write(10) for all Actually, it's the SCSI disk driver which decide

[PATCH] USB enclosures seem to require read(16) with >2TB drives

2012-11-09 Thread Jason J. Herne
From: "Jason J. Herne" Force large capacity (> 2TB) drives in USB enclosures to use READ(16) instead of READ(10). Some(most/all?) enclosures do not like READ(10) commands when a large capacity drive is installed. Signed-off-by: Jason J. Herne --- drivers/scsi/sd.c |7 +--

USB enclosures seem to require read(16) with >2TB drives

2012-11-09 Thread Jason J. Herne
Hello, I've noticed Linux seems to have issues with external USB enclosures containing drives > 2 TB. The USB mass storage driver apparently emulates a SCSI device and sends a read/write(10) for all requests where the target sector is not large enough to require the use of read(16). The issue is