On Fri, May 4, 2012 at 6:06 PM, Paolo Bonzini <pbonz...@redhat.com> wrote:
> Il 24/04/2012 08:29, Ronnie Sahlberg ha scritto:
>> +    itask->bs->total_sectors    = rc16->returned_lba *
>> +                               rc16->block_length / BDRV_SECTOR_SIZE ;
>
> Ronnie, does this need to be "(rc16->returned_lba + 1) * ..."?
>
> READ CAPACITY returns the highest valid LBA, not the size.
>
> Please send a patch to fix this up if that's the case.
>

Absolutely. A patch is on its way.
This is probably the third time I have made the same mistake of
RC10/16 returns the lba of last block, not the number of blocks.
I think READCAPACITY is just not compatible with my brain here.


regards
ronnie sahlberg

Reply via email to