summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2018-07-25 13:20:32 +0200
committerKevin Wolf <kwolf@redhat.com>2018-07-30 15:35:37 +0200
commit52ebcb268273de217510bc9ed688c23894ae32a2 (patch)
tree87df452573976d56972e5f730f4e833990c73d2a
parent8ba4f10fa689251facd483c3ee0ef4dd4e9bec53 (diff)
downloadfocaccia-qemu-52ebcb268273de217510bc9ed688c23894ae32a2.tar.gz
focaccia-qemu-52ebcb268273de217510bc9ed688c23894ae32a2.zip
block: Fix documentation for BDRV_REQ_MAY_UNMAP
BDRV_REQ_MAY_UNMAP in a write_zeroes request does not only allow the
driver to unmap the blocks, but it actively requests that the blocks be
unmapped afterwards if at all possible.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--include/block/block.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/block/block.h b/include/block/block.h
index f85e3a6ed3..4e0871aaf9 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -43,11 +43,12 @@ typedef struct BlockFragInfo {
 typedef enum {
     BDRV_REQ_COPY_ON_READ       = 0x1,
     BDRV_REQ_ZERO_WRITE         = 0x2,
-    /* The BDRV_REQ_MAY_UNMAP flag is used to indicate that the block driver
-     * is allowed to optimize a write zeroes request by unmapping (discarding)
-     * 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.
+
+    /*
+     * The BDRV_REQ_MAY_UNMAP flag is used in write_zeroes requests to indicate
+     * that the block driver should unmap (discard) 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.
      */
     BDRV_REQ_MAY_UNMAP          = 0x4,