master - metadata: automatically remove invalid (dangling) historical LVs
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8a601454e178c72b39be66365eaa153d69d4ed40 Commit: 8a601454e178c72b39be66365eaa153d69d4ed40 Parent: 1297b0c8bef38a9269186ca26d6827560ce0fddf Author: Peter Rajnoha <[email protected]> AuthorDate: Wed Mar 2 12:19:07 2016 +0100 Committer: Peter Rajnoha <[email protected]> CommitterDate: Thu Mar 3 13:50:59 2016 +0100
metadata: automatically remove invalid (dangling) historical LVs
Historical LV is valid as long as there is at least one live LV among its ancestors. If we find any invalid (dangling) historical LVs, remove them automatically.
--- lib/metadata/lv.h | 2 ++ lib/metadata/metadata.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletions(-)
lib/metadata/lv.h +2 -0
@@ -94,6 +94,8 @@ struct historical_logical_volume {uint64_t timestamp_removed;struct generic_logical_volume *indirect_origin;struct dm_list indirect_glvs;/* list of struct generic_logical_volume */ + int checked:1; /* set if this historical LV has been checked for validity */ + int valid:1; /* historical LV is valid if there's at least one live LV among ancestors */ };struct generic_logical_volume {
lib/metadata/metadata.c +46 -1
67 lines not on this page · raw message