yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

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

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