[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 05/21] block: rename backup-top to copy-before-write
From: |
Max Reitz |
Subject: |
Re: [PATCH 05/21] block: rename backup-top to copy-before-write |
Date: |
Mon, 17 May 2021 18:05:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote:
We are going to convert backup_top to full featured public filter,
which can be used in separate of backup job. Start from renaming from
"how it used" to "what it does".
Is this safe? The name was externally visible in queries after all.
(I’m not saying it is unsafe, I just don’t know and would like to know
whether you’ve considered this already.)
(Regardless, renaming files and so on is fine, of course.)
While updating comments in 283 iotest, drop and rephrase also things
about ".active", as this field is now dropped, and filter doesn't have
"inactive" mode.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
block/{backup-top.h => copy-before-write.h} | 28 +++---
block/backup.c | 22 ++---
block/{backup-top.c => copy-before-write.c} | 100 ++++++++++----------
MAINTAINERS | 4 +-
block/meson.build | 2 +-
tests/qemu-iotests/283 | 35 +++----
tests/qemu-iotests/283.out | 4 +-
7 files changed, 95 insertions(+), 100 deletions(-)
rename block/{backup-top.h => copy-before-write.h} (56%)
rename block/{backup-top.c => copy-before-write.c} (62%)
[...]
diff --git a/block/backup-top.c b/block/copy-before-write.c
similarity index 62%
rename from block/backup-top.c
rename to block/copy-before-write.c
index 425e3778be..40e91832d7 100644
--- a/block/backup-top.c
+++ b/block/copy-before-write.c
[...]
@@ -32,25 +32,25 @@
[...]
-static coroutine_fn int backup_top_cbw(BlockDriverState *bs, uint64_t offset,
- uint64_t bytes, BdrvRequestFlags flags)
+static coroutine_fn int cbw_cbw(BlockDriverState *bs, uint64_t offset,
+ uint64_t bytes, BdrvRequestFlags flags)
I’m sure you noticed it, too, but cbw_cbw() is weird. Perhaps
cbw_do_cbw() at least?
Max
[PATCH 02/21] block: introduce blk_replace_bs, Vladimir Sementsov-Ogievskiy, 2021/05/17
[PATCH 05/21] block: rename backup-top to copy-before-write, Vladimir Sementsov-Ogievskiy, 2021/05/17
- Re: [PATCH 05/21] block: rename backup-top to copy-before-write,
Max Reitz <=
[PATCH 03/21] qdev-properties: PropertyInfo: add realized_set_allowed field, Vladimir Sementsov-Ogievskiy, 2021/05/17
[PATCH 10/21] block/copy-before-write: relax permission requirements when no parents, Vladimir Sementsov-Ogievskiy, 2021/05/17
[PATCH 04/21] qdev: allow setting drive property for realized device, Vladimir Sementsov-Ogievskiy, 2021/05/17