From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bD27U-00084E-KI for qemu-devel@nongnu.org; Wed, 15 Jun 2016 00:08:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bD27S-000140-Fh for qemu-devel@nongnu.org; Wed, 15 Jun 2016 00:07:59 -0400 References: <1465917916-22348-1-git-send-email-den@openvz.org> <1465917916-22348-7-git-send-email-den@openvz.org> From: Eric Blake Message-ID: <5760D496.6030908@redhat.com> Date: Tue, 14 Jun 2016 22:07:50 -0600 MIME-Version: 1.0 In-Reply-To: <1465917916-22348-7-git-send-email-den@openvz.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oe6qDCxqTFDr5qN519DgtHL1gbATSTVf4" Subject: Re: [Qemu-devel] [PATCH 6/9] block: pass qiov into before_write notifier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" , qemu-devel@nongnu.org, qemu-block@nongnu.org Cc: vsementsov@virtuozzo.com, Stefan Hajnoczi , Fam Zheng , Kevin Wolf , Max Reitz , Jeff Cody This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --oe6qDCxqTFDr5qN519DgtHL1gbATSTVf4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/14/2016 09:25 AM, Denis V. Lunev wrote: > Signed-off-by: Denis V. Lunev The commit message says what, but not why. It's useful to give reviewers a hint as to why a patch makes sense (such as a future patch being able to use the write notifier to make mirroring more efficient if it knows what is being mirrored). > Reviewed-by: Vladimir Sementsov-Ogievskiy > CC: Stefan Hajnoczi > CC: Fam Zheng > CC: Kevin Wolf > CC: Max Reitz > CC: Jeff Cody > CC: Eric Blake > --- > block/io.c | 12 +++++++----- > include/block/block_int.h | 1 + > 2 files changed, 8 insertions(+), 5 deletions(-) >=20 > @@ -2228,7 +2230,7 @@ int coroutine_fn bdrv_co_discard(BlockDriverState= *bs, int64_t sector_num, > return 0; > } > =20 > - tracked_request_begin(&req, bs, sector_num, nb_sectors, > + tracked_request_begin(&req, bs, NULL, sector_num, nb_sectors, > BDRV_TRACKED_DISCARD); > bdrv_set_dirty(bs, sector_num, nb_sectors); > =20 > @@ -2331,7 +2333,7 @@ static int bdrv_co_do_ioctl(BlockDriverState *bs,= int req, void *buf) > }; > BlockAIOCB *acb; > =20 > - tracked_request_begin(&tracked_req, bs, 0, 0, BDRV_TRACKED_IOCTL);= > + tracked_request_begin(&tracked_req, bs, NULL, 0, 0, BDRV_TRACKED_I= OCTL); > if (!drv || !drv->bdrv_aio_ioctl) { > co.ret =3D -ENOTSUP; > goto out; > diff --git a/include/block/block_int.h b/include/block/block_int.h > index 30a9717..72f463a 100644 > --- a/include/block/block_int.h > +++ b/include/block/block_int.h > @@ -69,6 +69,7 @@ enum BdrvTrackedRequestType { > =20 > typedef struct BdrvTrackedRequest { > BlockDriverState *bs; > + QEMUIOVector *qiov; > int64_t offset; > unsigned int bytes; I guess bytes and qiov->size are not always redundant, because you pass NULL for qiov for a zero or discard operation (an alternative would be to always pass a qiov, even for zero/discard, so that we only need a single size). But I've been pointing out our inconsistent use of qiov for zeroes in multiple places, so I don't think it's worth changing in this series, but in one of its own if we want to do it. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --oe6qDCxqTFDr5qN519DgtHL1gbATSTVf4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXYNSWAAoJEKeha0olJ0NqhyYH/1UcKjXlrlOB9PPkbBDvPyZ4 2nsN91nXm0WqTYxnJvVeC68589BHE6PxbJ0jIEaDuCVYGt/qZ4OlvqTPcE4762Mi iXzhpO/94zPLsDLXAwK3ZF9nJ8z4cdbJ5XtP2dNY8cYU0bsCy3+l1up6rKB9cQK8 Ewt3a91nN3RU4BPkmg29GxYzVeMLMzI+S1RcK2s0OQF1u0Zwd0zre3mCMV0kD8yG NDuDSBMSxpiwmtWcDducQvadVVU22d9Hi58TaV4Lzz/J+apzNLuA+Pvlj45nyAOU gLEiIUptEB3BkFEUHPidBcHLcBpjF50zX5a/J4MC5tUbpxvg8gdbs9Lj9U79Ysg= =k1Hn -----END PGP SIGNATURE----- --oe6qDCxqTFDr5qN519DgtHL1gbATSTVf4--