diff --git a/WHATS_NEW b/WHATS_NEW index 0b48e032b..cb93bbef1 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.03.06 - ================================ + Improve internal removal of cached devices. Synchronize with udev when dropping snapshot. Add missing device synchronization point before removing pvmove node. Correctly set read_ahead for LVs when pvmove is finished. diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 6aee947b9..af3a16fe2 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -6544,6 +6544,13 @@ int lv_remove_with_dependencies(struct cmd_context *cmd, struct logical_volume * return 0; } + if (lv_is_cache_origin(lv)) { + if (!_lv_remove_segs_using_this_lv(cmd, lv, force, level, "cache origin")) + return_0; + /* Removal of cache LV also removes caching origin */ + return 1; + } + if (lv_is_external_origin(lv) && !_lv_remove_segs_using_this_lv(cmd, lv, force, level, "external origin")) return_0;