From 390ff5be2fd9dda47f2bfd2db96de64acc925002 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Fri, 17 Mar 2023 16:39:48 -0500 Subject: raidintegrity: allow writecache and cache Allow writecache|cache over raid+integrity LV. --- lib/metadata/snapshot_manip.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') diff --git a/lib/metadata/snapshot_manip.c b/lib/metadata/snapshot_manip.c index 99eb9c30d..822b8da77 100644 --- a/lib/metadata/snapshot_manip.c +++ b/lib/metadata/snapshot_manip.c @@ -391,6 +391,14 @@ int validate_snapshot_origin(const struct logical_volume *origin_lv) { const char *err = NULL; /* For error string */ + if (lv_is_cache(origin_lv) || lv_is_writecache(origin_lv)) { + struct logical_volume *lv = seg_lv(first_seg(origin_lv), 0); + if (lv_is_raid(lv) && lv_raid_has_integrity(lv)) { + err = "raid with integrity"; + goto out; + } + } + if (lv_is_cow(origin_lv)) err = "snapshots"; else if (lv_is_locked(origin_lv)) @@ -419,6 +427,7 @@ int validate_snapshot_origin(const struct logical_volume *origin_lv) err = "raid with integrity"; } + out: if (err) { log_error("Snapshots of %s are not supported.", err); return 0; -- cgit v1.2.1