From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3VSE-0008LI-AK for qemu-devel@nongnu.org; Thu, 19 May 2016 17:26:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3VSB-0004AP-7e for qemu-devel@nongnu.org; Thu, 19 May 2016 17:26:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3VSB-0004AK-1o for qemu-devel@nongnu.org; Thu, 19 May 2016 17:25:59 -0400 Date: Thu, 19 May 2016 14:25:54 -0700 From: Stefan Hajnoczi Message-ID: <20160519212554.GH24257@stefanha-x1.localdomain> References: <1463229957-14253-1-git-send-email-den@openvz.org> <1463229957-14253-2-git-send-email-den@openvz.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lrvsYIebpInmECXG" Content-Disposition: inline In-Reply-To: <1463229957-14253-2-git-send-email-den@openvz.org> Subject: Re: [Qemu-devel] [PATCH 01/10] block/io: add bdrv_co_write_compressed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: qemu-devel@nongnu.org, Pavel Butsykin , Jeff Cody , Markus Armbruster , Eric Blake , John Snow , Kevin Wolf --lrvsYIebpInmECXG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 14, 2016 at 03:45:49PM +0300, Denis V. Lunev wrote: > diff --git a/block/io.c b/block/io.c > index cd6d71a..88af10c 100644 > --- a/block/io.c > +++ b/block/io.c > @@ -1828,8 +1828,8 @@ int bdrv_is_allocated_above(BlockDriverState *top, > return 0; > } > =20 > -int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num, > - const uint8_t *buf, int nb_sectors) > +int bdrv_co_write_compressed(BlockDriverState *bs, int64_t sector_num, > + int nb_sectors, QEMUIOVector *qiov) Please use the coroutine_fn attribute to declare that this function must be called in coroutine context. > diff --git a/include/block/block_int.h b/include/block/block_int.h > index a029c20..3c93ddb 100644 > --- a/include/block/block_int.h > +++ b/include/block/block_int.h > @@ -208,6 +208,9 @@ struct BlockDriver { > int (*bdrv_write_compressed)(BlockDriverState *bs, int64_t sector_nu= m, > const uint8_t *buf, int nb_sectors); > =20 > + int (*bdrv_co_write_compressed)(BlockDriverState *bs, int64_t sector= _num, > + int nb_sectors, QEMUIOVector *qiov); Please add the coroutine_fn attribute just like .bdrv_co_readv() and friends. --lrvsYIebpInmECXG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXPi9iAAoJEJykq7OBq3PI2lQIAJ+SHaWLEi3B2IWJnq8I0rAk ktR5DUpfe5ZzjTCMwpGrpE3nhGcJCO2kKNRY8D4p0Zuxp6PSGowLxyHgIkztPJl+ ohiLLQo7Q1hy4Cm3TjbW67Qtq98YR0kcOD2QJ5V2dJP3i4iJosz/XOVgALfA7rNG 59jRhIqvZXQKdeS5QBSnMuOAKaPpkACUhhiZpoLwww/EDUxBzwsSKL4iUIeiyn+8 OYQxUtxsspsgE58xYGn4RXiR8rJyYgGXzONH14F4oGym8wez8pRqa0xE3++cFmBd Noo62hGyTQJUQsQMxAMEy/QcHvu4M9nxLnZOJFtw3ZRgsB0AxlgUZ1GIzrS6k00= =NWE4 -----END PGP SIGNATURE----- --lrvsYIebpInmECXG--