On 05/31/2016 03:15 AM, Denis V. Lunev wrote: > From: Pavel Butsykin > > For bdrv_pwrite_compressed() it looks like most of the code creating coroutine > is duplicated in blk_prw(). So we can just add a flag(BDRV_REQ_WRITE_COMPRESSED) > and use the blk_prw() as a generic one. > > Signed-off-by: Pavel Butsykin > Signed-off-by: Denis V. Lunev > CC: Jeff Cody > CC: Markus Armbruster > CC: Eric Blake > CC: John Snow > CC: Stefan Hajnoczi > CC: Kevin Wolf > --- > +++ b/include/block/block.h > @@ -65,6 +65,7 @@ typedef enum { > BDRV_REQ_MAY_UNMAP = 0x4, > BDRV_REQ_NO_SERIALISING = 0x8, > BDRV_REQ_FUA = 0x10, > + BDRV_REQ_WRITE_COMPRESSED = 0x20, > } BdrvRequestFlags; > Needs to be rebased on top of commit fa166538, and adjust BDRV_REQ_MASK at that time. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org