On Tue, 2017-04-04 at 19:35 -0400, Martin K. Petersen wrote:
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index fb9b4d29af0b..6084c415c070 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -2102,6 +2102,16 @@ static void read_capacity_error(struct scsi_disk
> *sdkp, struct
Bart Van Assche writes:
Hi Bart,
> Sorry but I still don't understand why the two checks are
> different. How about the (untested) patch below? The approach below
> avoids that the check is duplicated and - at least in my opinion -
> results in code that is easier to
On 02/27/2017 12:57 PM, Bart Van Assche wrote:
...
How about the (untested) patch below? The approach below avoids that the check
is
duplicated and - at least in my opinion - results in code that is easier to
read.
I find lba_too_large() a little dense, but functionally OK. The "shift
>= 0"
> "Bart" == Bart Van Assche writes:
Bart,
Bart> Sorry but I still don't understand why the two checks are
Bart> different. How about the (untested) patch below? The approach
Bart> below avoids that the check is duplicated and - at least in my
Bart> opinion -
On Mon, 2017-02-27 at 11:13 -0600, Steve Magnani wrote:
> On 02/27/2017 10:13 AM, Bart Van Assche wrote:
> > Why are the two checks slightly different? Could the same code be used for
> > both checks?
>
> The checks are different because with READ CAPACITY(16) a _really_ huge
> device could
Hi Bart -
Thanks for taking the time to look this over.
On 02/27/2017 10:13 AM, Bart Van Assche wrote:
On Mon, 2017-02-27 at 09:22 -0600, Steven J. Magnani wrote:
@@ -2122,7 +2122,10 @@ static int read_capacity_16(struct scsi_
return -ENODEV;
}
- if
On Mon, 2017-02-27 at 09:22 -0600, Steven J. Magnani wrote:
> @@ -2122,7 +2122,10 @@ static int read_capacity_16(struct scsi_
> return -ENODEV;
> }
>
> - if ((sizeof(sdkp->capacity) == 4) && (lba >= 0xULL)) {
> + /* Make sure logical_to_sectors() won't
When the kernel is compiled _without_ support for large (>= 2TiB) block
devices, code in the sd driver's read_capacity() routines rejects devices
whose count of native-sized blocks does not fit in the 32 bit sector_t
type. A device reporting 4294967296 512-byte blocks will be rejected, but
a
8 matches
Mail list logo