On 09/13/2013 04:25 AM, Peter Lieven wrote: > the BDRV_REQ_MAY_UNMAP flag is used to indicate that block driver > is allowed to optimze a write zeroes request by unmapping (discarding)
s/optimze/optimize/ > blocks if it is guaranteed that the result will read back as > zeroes. > > the flag is only passed to the driver if the block device is > opened with BDRV_O_UNMAP. > > Signed-off-by: Peter Lieven <p...@kamp.de> > --- > +++ b/include/block/block.h > @@ -65,6 +65,7 @@ typedef struct BlockDevOps { > typedef enum { > BDRV_REQ_COPY_ON_READ = 0x1, > BDRV_REQ_ZERO_WRITE = 0x2, > + BDRV_REQ_MAY_UNMAP = 0x4, Now that this enum is public, it would be useful to have inline documentation, rather than making people dig up the git history of when it was introduced to learn its semantics. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature