Blame SOURCES/kvm-block-BLK_PERM_WRITE-includes-._UNCHANGED.patch

357786
From 68b3e533a4531486fe346f042e190fb5c426f24f Mon Sep 17 00:00:00 2001
357786
From: Max Reitz <mreitz@redhat.com>
357786
Date: Mon, 18 Jun 2018 16:12:05 +0200
357786
Subject: [PATCH 29/54] block: BLK_PERM_WRITE includes ..._UNCHANGED
357786
357786
RH-Author: Max Reitz <mreitz@redhat.com>
357786
Message-id: <20180618161212.14444-4-mreitz@redhat.com>
357786
Patchwork-id: 80763
357786
O-Subject: [RHV-7.6 qemu-kvm-rhev PATCH 03/10] block: BLK_PERM_WRITE includes ..._UNCHANGED
357786
Bugzilla: 1518738
357786
RH-Acked-by: John Snow <jsnow@redhat.com>
357786
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
357786
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
357786
357786
Currently we never actually check whether the WRITE_UNCHANGED
357786
permission has been taken for unchanging writes.  But the one check that
357786
is commented out checks both WRITE and WRITE_UNCHANGED; and considering
357786
that WRITE_UNCHANGED is already documented as being weaker than WRITE,
357786
we should probably explicitly document WRITE to include WRITE_UNCHANGED.
357786
357786
Signed-off-by: Max Reitz <mreitz@redhat.com>
357786
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
357786
Reviewed-by: Alberto Garcia <berto@igalia.com>
357786
Message-id: 20180421132929.21610-3-mreitz@redhat.com
357786
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
357786
Signed-off-by: Max Reitz <mreitz@redhat.com>
357786
(cherry picked from commit 24b7c538fea86b598e2a335f4805a0ab50a30e98)
357786
Signed-off-by: Max Reitz <mreitz@redhat.com>
357786
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
357786
---
357786
 include/block/block.h | 3 +++
357786
 1 file changed, 3 insertions(+)
357786
357786
diff --git a/include/block/block.h b/include/block/block.h
357786
index cdec363..397b5e8 100644
357786
--- a/include/block/block.h
357786
+++ b/include/block/block.h
357786
@@ -205,6 +205,9 @@ enum {
357786
      * This permission (which is weaker than BLK_PERM_WRITE) is both enough and
357786
      * required for writes to the block node when the caller promises that
357786
      * the visible disk content doesn't change.
357786
+     *
357786
+     * As the BLK_PERM_WRITE permission is strictly stronger, either is
357786
+     * sufficient to perform an unchanging write.
357786
      */
357786
     BLK_PERM_WRITE_UNCHANGED    = 0x04,
357786
 
357786
-- 
357786
1.8.3.1
357786