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