From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: fam@euphon.net, kwolf@redhat.com, vsementsov@virtuozzo.com,
quintela@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com,
stefanha@redhat.com, den@openvz.org, mreitz@redhat.com,
jsnow@redhat.com
Subject: [PATCH v2 1/5] block: Mark commit and mirror as filter drivers
Date: Thu, 19 Dec 2019 11:51:02 +0300 [thread overview]
Message-ID: <20191219085106.22309-2-vsementsov@virtuozzo.com> (raw)
In-Reply-To: <20191219085106.22309-1-vsementsov@virtuozzo.com>
From: Max Reitz <mreitz@redhat.com>
The commit and mirror block nodes are filters, so they should be marked
as such.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
[squash comment fix from another Max's patch and adjust commit msg]
---
include/block/block_int.h | 8 +++++---
block/commit.c | 2 ++
block/mirror.c | 2 ++
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/include/block/block_int.h b/include/block/block_int.h
index dd033d0b37..964ce58481 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -89,9 +89,11 @@ struct BlockDriver {
int instance_size;
/* set to true if the BlockDriver is a block filter. Block filters pass
- * certain callbacks that refer to data (see block.c) to their bs->file if
- * the driver doesn't implement them. Drivers that do not wish to forward
- * must implement them and return -ENOTSUP.
+ * certain callbacks that refer to data (see block.c) to their bs->file
+ * or bs->backing (whichever one exists) if the driver doesn't implement
+ * them. Drivers that do not wish to forward must implement them and return
+ * -ENOTSUP.
+ * Note that filters are not allowed to modify data.
*/
bool is_filter;
/* for snapshots block filter like Quorum can implement the
diff --git a/block/commit.c b/block/commit.c
index 23c90b3b91..9b455c4285 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -253,6 +253,8 @@ static BlockDriver bdrv_commit_top = {
.bdrv_co_block_status = bdrv_co_block_status_from_backing,
.bdrv_refresh_filename = bdrv_commit_top_refresh_filename,
.bdrv_child_perm = bdrv_commit_top_child_perm,
+
+ .is_filter = true,
};
void commit_start(const char *job_id, BlockDriverState *bs,
diff --git a/block/mirror.c b/block/mirror.c
index f0f2d9dff1..8cbbe1e065 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -1505,6 +1505,8 @@ static BlockDriver bdrv_mirror_top = {
.bdrv_co_block_status = bdrv_co_block_status_from_backing,
.bdrv_refresh_filename = bdrv_mirror_top_refresh_filename,
.bdrv_child_perm = bdrv_mirror_top_child_perm,
+
+ .is_filter = true,
};
static BlockJob *mirror_start_job(
--
2.21.0
next prev parent reply other threads:[~2019-12-19 8:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-19 8:51 [PATCH v2 0/5] fix migration with bitmaps and mirror Vladimir Sementsov-Ogievskiy
2019-12-19 8:51 ` Vladimir Sementsov-Ogievskiy [this message]
2020-01-31 19:23 ` [PATCH v2 1/5] block: Mark commit and mirror as filter drivers Eric Blake
2020-05-14 18:51 ` Eric Blake
2019-12-19 8:51 ` [PATCH v2 2/5] migretion/block-dirty-bitmap: refactor init_dirty_bitmap_migration Vladimir Sementsov-Ogievskiy
2020-01-31 19:28 ` Eric Blake
2019-12-19 8:51 ` [PATCH v2 3/5] block/dirty-bitmap: add bdrv_has_named_bitmaps helper Vladimir Sementsov-Ogievskiy
2020-05-14 18:30 ` Eric Blake
2019-12-19 8:51 ` [PATCH v2 4/5] migration/block-dirty-bitmap: fix bitmaps migration during mirror job Vladimir Sementsov-Ogievskiy
2020-05-14 18:52 ` Eric Blake
2019-12-19 8:51 ` [PATCH v2 5/5] iotests: 194: test also migration of dirty bitmap Vladimir Sementsov-Ogievskiy
2019-12-19 10:36 ` [PATCH v2 0/5] fix migration with bitmaps and mirror Peter Krempa
2019-12-19 11:39 ` Vladimir Sementsov-Ogievskiy
2020-04-03 11:02 ` Vladimir Sementsov-Ogievskiy
2020-04-03 11:23 ` Peter Krempa
2020-04-03 11:29 ` Vladimir Sementsov-Ogievskiy
2020-04-03 11:52 ` Vladimir Sementsov-Ogievskiy
2020-04-03 15:05 ` Dr. David Alan Gilbert
2020-04-03 15:34 ` Vladimir Sementsov-Ogievskiy
2020-05-14 18:29 ` Eric Blake
2020-05-15 5:52 ` Vladimir Sementsov-Ogievskiy
2020-05-15 11:15 ` Vladimir Sementsov-Ogievskiy
2020-05-15 17:51 ` Eric Blake
2020-05-15 19:49 ` Vladimir Sementsov-Ogievskiy
2020-01-20 9:04 ` Vladimir Sementsov-Ogievskiy
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=20191219085106.22309-2-vsementsov@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=den@openvz.org \
--cc=dgilbert@redhat.com \
--cc=fam@euphon.net \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanha@redhat.com \
/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.