All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [PATCH] ISCSI: Add support for thin-provisioning via discard/UNMAP and bigger LUNs
       [not found] ` <1335248944-10765-2-git-send-email-ronniesahlberg@gmail.com>
@ 2012-05-04  8:06   ` Paolo Bonzini
  2012-05-04  8:20     ` ronnie sahlberg
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2012-05-04  8:06 UTC (permalink / raw)
  To: Ronnie Sahlberg; +Cc: kwolf, qemu-devel

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.

Paolo

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] ISCSI: Add support for thin-provisioning via discard/UNMAP and bigger LUNs
  2012-05-04  8:06   ` [Qemu-devel] [PATCH] ISCSI: Add support for thin-provisioning via discard/UNMAP and bigger LUNs Paolo Bonzini
@ 2012-05-04  8:20     ` ronnie sahlberg
  0 siblings, 0 replies; 2+ messages in thread
From: ronnie sahlberg @ 2012-05-04  8:20 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kwolf, qemu-devel

On Fri, May 4, 2012 at 6:06 PM, Paolo Bonzini <pbonzini@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-04  8:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1335248944-10765-1-git-send-email-ronniesahlberg@gmail.com>
     [not found] ` <1335248944-10765-2-git-send-email-ronniesahlberg@gmail.com>
2012-05-04  8:06   ` [Qemu-devel] [PATCH] ISCSI: Add support for thin-provisioning via discard/UNMAP and bigger LUNs Paolo Bonzini
2012-05-04  8:20     ` ronnie sahlberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.