]> sourceware.org Git - lvm2.git/commit
toollib: honour '-H|--history' switch while executing process_each_lv_in_vg
authorPeter Rajnoha <prajnoha@redhat.com>
Tue, 1 Mar 2016 14:23:05 +0000 (15:23 +0100)
committerPeter Rajnoha <prajnoha@redhat.com>
Thu, 3 Mar 2016 12:49:14 +0000 (13:49 +0100)
commit2e7a1210622e25a5a3d813b9a069767eaad3b4ac
tree51c9aa748f4cff202445d8f15c1ceb0c211f08c4
parentf7e0a4cc1809c371a4aee2a3da8a3545379fcfbf
toollib: honour '-H|--history' switch while executing process_each_lv_in_vg

When processing LVs in a VG and when the -H|--history switch is used,
make process_each_lv_in_vg to iterate over historical volumes too.

For each historical LV, we use dummy struct logical_volume instance with
the "this_glv" reference set to a wrapper over proper struct
historical_logical_volume representation. This makes it possible to process
historical LVs just like normal live LVs (though a dummy one without any
segments and all the other fields zeroed and blank) and it also allows
for using all historical LV related information via lv->this_glv->historical
reference.

One can use a simple call to lv_is_historical to make a difference between
live and historical LV in all the code that is called by process_each_* fns.
tools/toollib.c
This page took 0.035164 seconds and 5 git commands to generate.