[Devel] [PATCH RHEL8 COMMIT] dm: Allow singleton target with devices attached
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Sep 10 20:16:48 MSK 2021
The commit is pushed to "branch-rh8-4.18.0-305.3.1.vz8.7.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-305.3.1.vz8.7.11
------>
commit 904da50775362b15a0b4ba6b442c0b86bb6ae3c0
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Fri Sep 10 20:16:47 2021 +0300
dm: Allow singleton target with devices attached
To replace ploop target with push backup on reload
we have to make them both !immutable. But after that,
we fail on this check, since it prohibits !immutable
targets, which are connected with real devices.
I don't see real reasons for that. The commit, which
added the check, cares about NVME bio base targets
(22c11858e800 "dm: introduce DM_TYPE_NVME_BIO_BASED").
Both ploop and push_backup drivers will be !bio based
(request-based push backup is under developments).
So, it looks safe to replace this with another check.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
====================
push_backup: Make target !immutable.
https://jira.sw.ru/browse/PSBM-127989
Kirill Tkhai (14):
push_backup: Rename ppb_map
push_backup: Add unsigned long alignment
push_backup: Add pending_map
push_backup: Kill find_node_pbio_range()
push_backup: Use nr_delayed in postpone_if_required_for_backup()
push_backup: Introduce hash table
push_backup: Leave pending pbio in pending queue
push_backup: Do not split bios by cluster size
dm: Allow singleton target with devices attached
dm: Introduce dm_requeue_original_rq()
push_backup: Make it request based
push_backup: Change retval postpone_if_required_for_backup()
push_backup: Change arguments of calc_bio_clusters()
push_backup: Make the target !immutable
---
drivers/md/dm-table.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index fdca63e7db9b..b130ccf6e4b2 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -960,11 +960,8 @@ static int dm_table_determine_type(struct dm_table *t)
return 0;
}
- tgt = dm_table_get_immutable_target(t);
- if (!tgt) {
- DMERR("table load rejected: immutable target is required");
- return -EINVAL;
- } else if (tgt->max_io_len) {
+ tgt = &t->targets[0];
+ if (tgt->max_io_len) {
DMERR("table load rejected: immutable target that splits IO is not supported");
return -EINVAL;
}
More information about the Devel
mailing list