Re: [PATCH] sd: fixup capacity calculation for 4k drives

2016-04-09 Thread Lee Duncan
On 03/29/2016 01:06 AM, Hannes Reinecke wrote: > in sd_read_capacity() the sdkp->capacity field changes its meaning: > after the call to read_capacity_XX() it carries the _unscaled_ values, > making the comparison between the original value and the new value > always false for drives with a sector

Re: [PATCH] sd: fixup capacity calculation for 4k drives

2016-03-28 Thread Martin K. Petersen
> "Ewan" == Ewan D Milne writes: Ewan/Hannes, Sorry I dropped the ball on this. My eyes started bleeding. Ewan> If we change the meaning of the scsi_disk->capacity field to be Ewan> logical sectors, we also have to change sd_getgeo() in sd.c, do we Ewan> not? I did consider that before sen

Re: [PATCH] sd: fixup capacity calculation for 4k drives

2016-03-22 Thread Ewan D. Milne
On Tue, 2016-03-22 at 08:14 +0100, Hannes Reinecke wrote: > On 03/22/2016 02:16 AM, Martin K. Petersen wrote: > >> "Hannes" == Hannes Reinecke writes: > > > > Hannes> in sd_read_capacity() the sdkp->capacity field changes its > > Hannes> meaning: after the call to read_capacity_XX() it carrie

Re: [PATCH] sd: fixup capacity calculation for 4k drives

2016-03-22 Thread Hannes Reinecke
On 03/22/2016 02:16 AM, Martin K. Petersen wrote: >> "Hannes" == Hannes Reinecke writes: > > Hannes> in sd_read_capacity() the sdkp->capacity field changes its > Hannes> meaning: after the call to read_capacity_XX() it carries the > Hannes> _unscaled_ values, making the comparison between the

Re: [PATCH] sd: fixup capacity calculation for 4k drives

2016-03-21 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] sd: fixup capacity calculation for 4k drives

2016-03-21 Thread Martin K. Petersen
> "Hannes" == Hannes Reinecke writes: Hannes> in sd_read_capacity() the sdkp->capacity field changes its Hannes> meaning: after the call to read_capacity_XX() it carries the Hannes> _unscaled_ values, making the comparison between the original Hannes> value and the new value always false for

Re: [PATCH] sd: fixup capacity calculation for 4k drives

2016-03-21 Thread Christoph Hellwig
On Mon, Mar 21, 2016 at 01:27:29PM +0100, Hannes Reinecke wrote: > in sd_read_capacity() the sdkp->capacity field changes its meaning: > after the call to read_capacity_XX() it carries the _unscaled_ values, > making the comparison between the original value and the new value > always false for dri