[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 01/19] blockdev: Allow external snapshots everywhere
From: |
Max Reitz |
Subject: |
[PATCH v4 01/19] blockdev: Allow external snapshots everywhere |
Date: |
Tue, 18 Feb 2020 11:34:36 +0100 |
There is no good reason why we would allow external snapshots only on
the first non-filter node in a chain. Parent BDSs should not care
whether their child is replaced by a snapshot. (If they do care, they
should announce that via freezing the chain, which is checked in
bdrv_append() through bdrv_set_backing_hd().)
Before we had bdrv_is_first_non_filter() here (since 212a5a8f095), there
was a special function bdrv_check_ext_snapshot() that allowed snapshots
by default, but block drivers could override this. Only blkverify did
so, however.
It is not clear to me why blkverify would do so; maybe just so that the
testee block driver would not be replaced. The introducing commit
f6186f49e2c does not explain why. Maybe because 08b24cfe376 would have
been the correct solution? (Which adds a .supports_backing check.)
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
blockdev.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 43d931fd79..1745d740ec 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1592,11 +1592,6 @@ static void external_snapshot_prepare(BlkActionState
*common,
}
}
- if (!bdrv_is_first_non_filter(state->old_bs)) {
- error_setg(errp, QERR_FEATURE_DISABLED, "snapshot");
- goto out;
- }
-
if (action->type == TRANSACTION_ACTION_KIND_BLOCKDEV_SNAPSHOT_SYNC) {
BlockdevSnapshotSync *s = action->u.blockdev_snapshot_sync.data;
const char *format = s->has_format ? s->format : "qcow2";
--
2.24.1
- [PATCH v4 00/19] block: Fix check_to_replace_node(), Max Reitz, 2020/02/18
- [PATCH v4 01/19] blockdev: Allow external snapshots everywhere,
Max Reitz <=
- [PATCH v4 02/19] blockdev: Allow resizing everywhere, Max Reitz, 2020/02/18
- [PATCH v4 03/19] block: Drop bdrv_is_first_non_filter(), Max Reitz, 2020/02/18
- [PATCH v4 04/19] iotests: Let 041 use -blockdev for quorum children, Max Reitz, 2020/02/18
- [PATCH v4 05/19] quorum: Fix child permissions, Max Reitz, 2020/02/18
- [PATCH v4 06/19] block: Add bdrv_recurse_can_replace(), Max Reitz, 2020/02/18
- [PATCH v4 07/19] blkverify: Implement .bdrv_recurse_can_replace(), Max Reitz, 2020/02/18
- [PATCH v4 08/19] quorum: Implement .bdrv_recurse_can_replace(), Max Reitz, 2020/02/18
- [PATCH v4 10/19] block: Remove bdrv_recurse_is_first_non_filter(), Max Reitz, 2020/02/18
- [PATCH v4 09/19] block: Use bdrv_recurse_can_replace(), Max Reitz, 2020/02/18
- [PATCH v4 11/19] mirror: Double-check immediately before replacing, Max Reitz, 2020/02/18