From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFMTM-0007rF-MO for qemu-devel@nongnu.org; Tue, 21 Jun 2016 10:16:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFMTK-0007o8-Km for qemu-devel@nongnu.org; Tue, 21 Jun 2016 10:16:11 -0400 Date: Tue, 21 Jun 2016 16:16:00 +0200 From: Kevin Wolf Message-ID: <20160621141600.GJ4520@noname.redhat.com> References: <1465939839-30097-1-git-send-email-eblake@redhat.com> <1465939839-30097-18-git-send-email-eblake@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465939839-30097-18-git-send-email-eblake@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 17/17] block: Move request_alignment into BlockLimit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Max Reitz , Stefan Hajnoczi , Fam Zheng , Ronnie Sahlberg , Paolo Bonzini , Peter Lieven 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 > > --- > 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