Am 14.06.2016 um 23:30 hat Eric Blake geschrieben: > It makes more sense to have ALL block size limit constraints > in the same struct. Improve the documentation while at it. > > Signed-off-by: Eric Blake <ebl...@redhat.com> > > --- > v2: drop hacks for save/restore of alignment, now that earlier > patches handled setting up BlockLimits more sanely > --- > include/block/block_int.h | 22 +++++++++++++--------- > block.c | 2 +- > block/blkdebug.c | 4 ++-- > block/bochs.c | 2 +- > block/cloop.c | 2 +- > block/dmg.c | 2 +- > block/io.c | 12 ++++++------ > block/iscsi.c | 2 +- > block/qcow2.c | 2 +- > block/raw-posix.c | 16 ++++++++-------- > block/raw-win32.c | 6 +++--- > block/vvfat.c | 2 +- > 12 files changed, 39 insertions(+), 35 deletions(-) > > diff --git a/include/block/block_int.h b/include/block/block_int.h > index 88ef826..77f47d9 100644 > --- a/include/block/block_int.h > +++ b/include/block/block_int.h > @@ -324,6 +324,12 @@ struct BlockDriver { > }; > > struct BlockLimits { > + /* Alignment requirement, in bytes, for offset/length of I/O > + * requests. Must be a power of 2 less than INT_MAX. A value of 0 > + * defaults to 1 for drivers with modern byte interfaces, and to > + * 512 otherwise. */
No, a value of zero probably crashes qemu. The defaults apply when they aren't overridden by the driver, but this field is always non-zero. > + uint32_t request_alignment; > + > /* maximum number of bytes that can be discarded at once (since it > * is signed, it must be < 2G, if set), should be multiple of > * pdiscard_alignment, but need not be power of 2. May be 0 if no Kevin