From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, famz@redhat.com, mreitz@redhat.com,
qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 6/6] file-posix: Remove .bdrv_inactivate/invalidate_cache
Date: Thu, 4 May 2017 18:52:41 +0200 [thread overview]
Message-ID: <1493916761-32319-7-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1493916761-32319-1-git-send-email-kwolf@redhat.com>
Now that the block layer takes care to request a lot less permissions
for inactive nodes, the special-casing in file-posix isn't necessary any
more.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/file-posix.c | 33 ---------------------------------
1 file changed, 33 deletions(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index f1f924b..90a5f53 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -2190,35 +2190,6 @@ static void raw_abort_perm_update(BlockDriverState *bs)
raw_handle_perm_lock(bs, RAW_PL_ABORT, 0, 0, NULL);
}
-static int raw_inactivate(BlockDriverState *bs)
-{
- int ret;
- uint64_t perm = 0;
- uint64_t shared = BLK_PERM_ALL;
-
- ret = raw_handle_perm_lock(bs, RAW_PL_PREPARE, perm, shared, NULL);
- if (ret) {
- return ret;
- }
- raw_handle_perm_lock(bs, RAW_PL_COMMIT, perm, shared, NULL);
- return 0;
-}
-
-
-static void raw_invalidate_cache(BlockDriverState *bs, Error **errp)
-{
- BDRVRawState *s = bs->opaque;
- int ret;
-
- assert(!(bdrv_get_flags(bs) & BDRV_O_INACTIVE));
- ret = raw_handle_perm_lock(bs, RAW_PL_PREPARE, s->perm, s->shared_perm,
- errp);
- if (ret) {
- return;
- }
- raw_handle_perm_lock(bs, RAW_PL_COMMIT, s->perm, s->shared_perm, NULL);
-}
-
BlockDriver bdrv_file = {
.format_name = "file",
.protocol_name = "file",
@@ -2249,8 +2220,6 @@ BlockDriver bdrv_file = {
.bdrv_get_info = raw_get_info,
.bdrv_get_allocated_file_size
= raw_get_allocated_file_size,
- .bdrv_inactivate = raw_inactivate,
- .bdrv_invalidate_cache = raw_invalidate_cache,
.bdrv_check_perm = raw_check_perm,
.bdrv_set_perm = raw_set_perm,
.bdrv_abort_perm_update = raw_abort_perm_update,
@@ -2712,8 +2681,6 @@ static BlockDriver bdrv_host_device = {
.bdrv_get_info = raw_get_info,
.bdrv_get_allocated_file_size
= raw_get_allocated_file_size,
- .bdrv_inactivate = raw_inactivate,
- .bdrv_invalidate_cache = raw_invalidate_cache,
.bdrv_check_perm = raw_check_perm,
.bdrv_set_perm = raw_set_perm,
.bdrv_abort_perm_update = raw_abort_perm_update,
--
1.8.3.1
next prev parent reply other threads:[~2017-05-04 16:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-04 16:52 [Qemu-devel] [PATCH 0/6] block: Fix op blockers for inactive images Kevin Wolf
2017-05-04 16:52 ` [Qemu-devel] [PATCH 1/6] migration: Unify block node activation error handling Kevin Wolf
2017-05-04 17:12 ` Eric Blake
2017-05-04 16:52 ` [Qemu-devel] [PATCH 2/6] block: New BdrvChildRole.activate() for blk_resume_after_migration() Kevin Wolf
2017-05-04 17:19 ` Eric Blake
2017-05-04 16:52 ` [Qemu-devel] [PATCH 3/6] block: Drop permissions when migration completes Kevin Wolf
2017-05-04 17:21 ` Eric Blake
2017-05-04 16:52 ` [Qemu-devel] [PATCH 4/6] block: Inactivate parents before children Kevin Wolf
2017-05-04 17:23 ` Eric Blake
2017-05-04 16:52 ` [Qemu-devel] [PATCH 5/6] block: Fix write/resize permissions for inactive images Kevin Wolf
2017-05-04 17:42 ` Eric Blake
2017-08-18 10:06 ` Xie Changlong
2017-08-18 12:04 ` Fam Zheng
2017-05-04 16:52 ` Kevin Wolf [this message]
2017-05-04 17:46 ` [Qemu-devel] [PATCH 6/6] file-posix: Remove .bdrv_inactivate/invalidate_cache Eric Blake
2017-05-09 14:54 ` [Qemu-devel] [PATCH 0/6] block: Fix op blockers for inactive images 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=1493916761-32319-7-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=famz@redhat.com \
--cc=mreitz@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).