Re: [Qemu-block] [PATCH 12/17] iscsi: Switch .bdrv_co_discard() to byte-based

2016-07-14 Thread Stefan Hajnoczi
On Wed, Jun 22, 2016 at 09:51:09AM -0600, Eric Blake wrote: > Another step towards killing off sector-based block APIs. > > Unlike write_zeroes, where we can be handed unaligned requests > and must fail gracefully with -ENOTSUP for a fallback, we are > guaranteed that discard requests are always

[Qemu-block] [PATCH 12/17] iscsi: Switch .bdrv_co_discard() to byte-based

2016-06-22 Thread Eric Blake
Another step towards killing off sector-based block APIs. Unlike write_zeroes, where we can be handed unaligned requests and must fail gracefully with -ENOTSUP for a fallback, we are guaranteed that discard requests are always aligned because the block layer already ignored unaligned head/tail.