From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 4/5] block: Move two block permission constants to the relevant enum
Date: Tue, 3 Jul 2018 16:59:14 +0200 [thread overview]
Message-ID: <20180703145915.32607-5-kwolf@redhat.com> (raw)
In-Reply-To: <20180703145915.32607-1-kwolf@redhat.com>
From: Ari Sundholm <ari@tuxera.com>
This allows using the two constants outside of block.c, which will
happen in a subsequent patch.
Signed-off-by: Ari Sundholm <ari@tuxera.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
include/block/block.h | 7 +++++++
block.c | 6 ------
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/block/block.h b/include/block/block.h
index e5c7759a0c..bc76b1e59f 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -225,6 +225,13 @@ enum {
BLK_PERM_GRAPH_MOD = 0x10,
BLK_PERM_ALL = 0x1f,
+
+ DEFAULT_PERM_PASSTHROUGH = BLK_PERM_CONSISTENT_READ
+ | BLK_PERM_WRITE
+ | BLK_PERM_WRITE_UNCHANGED
+ | BLK_PERM_RESIZE,
+
+ DEFAULT_PERM_UNCHANGED = BLK_PERM_ALL & ~DEFAULT_PERM_PASSTHROUGH,
};
char *bdrv_perm_names(uint64_t perm);
diff --git a/block.c b/block.c
index 70a46fdd84..961ec97d26 100644
--- a/block.c
+++ b/block.c
@@ -1948,12 +1948,6 @@ int bdrv_child_try_set_perm(BdrvChild *c, uint64_t perm, uint64_t shared,
return 0;
}
-#define DEFAULT_PERM_PASSTHROUGH (BLK_PERM_CONSISTENT_READ \
- | BLK_PERM_WRITE \
- | BLK_PERM_WRITE_UNCHANGED \
- | BLK_PERM_RESIZE)
-#define DEFAULT_PERM_UNCHANGED (BLK_PERM_ALL & ~DEFAULT_PERM_PASSTHROUGH)
-
void bdrv_filter_default_perms(BlockDriverState *bs, BdrvChild *c,
const BdrvChildRole *role,
BlockReopenQueue *reopen_queue,
--
2.13.6
next prev parent reply other threads:[~2018-07-03 14:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-03 14:59 [Qemu-devel] [PULL 0/5] Block layer patches Kevin Wolf
2018-07-03 14:59 ` [Qemu-devel] [PULL 1/5] qemu-img: allow compressed not-in-order writes Kevin Wolf
2018-07-03 14:59 ` [Qemu-devel] [PULL 2/5] qcow2: refactor data compression Kevin Wolf
2018-07-03 14:59 ` [Qemu-devel] [PULL 3/5] qcow2: add compress threads Kevin Wolf
2018-07-03 14:59 ` Kevin Wolf [this message]
2018-07-03 14:59 ` [Qemu-devel] [PULL 5/5] block: Add blklogwrites Kevin Wolf
2018-07-03 15:07 ` Kevin Wolf
2018-07-04 18:30 ` [Qemu-devel] [PULL 0/5] Block layer patches Peter Maydell
2018-07-05 8:28 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180703145915.32607-5-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.