]> sourceware.org Git - lvm2.git/commit
Define new functions and vgs/pvs fields related to mda ignore.
authorDave Wysochanski <dwysocha@redhat.com>
Mon, 28 Jun 2010 20:33:44 +0000 (20:33 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Mon, 28 Jun 2010 20:33:44 +0000 (20:33 +0000)
commitcdbe475fe397276582ca1cd7677fff7952c275c8
tree288342176cde353031e8b62b26a967085a64d973
parent9ccac021a7f198852b5ad33540d3844ae4677579
Define new functions and vgs/pvs fields related to mda ignore.

Define a new pvs field, pv_mda_used_count, and a new vgs field,
vg_mda_used_count to match the existing pv_mda_count and vg_mda_count.
These new fields count the number of mdas that have the 'ignored' bit
clear (they are in use on the PV / VG).  Also define various supporting
functions to implement the counting as well as setting the ignored
flag and determining if an mda is ignored.  These high level functions
call into the lower level location independent mda ignore functions
defined by earlier patches.

Note that counting ignored mdas in a vg requires traversing both lists
and checking for the ignored bit on the mda.  The count of 'ignored'
mdas then is defined by having the bit set, not by which list the mda
is on.  The list does determine whether LVM actually does read/write to
the mda, though we must count the bits in order to return accurate numbers
for the various counts.  Also, pv_mda_set_ignored must search both vg
lists for ignored mda.  If the state changes and needs to be committed
to disk, the ignored mda will be on the non-ignored list.

Note also in pv_mda_set_ignored(), we must properly manage the mda lists.
If we change the ignored state of an mda, we must change any mdas on
vg->fid->metadata_areas that correspond to this pv.  Also, we may
need to allocate a copy of the mda, as is done when fid->metadata_areas
is populated from _vg_read(), if we are un-ignoring an ignored mda.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
lib/metadata/metadata-exported.h
lib/metadata/metadata.c
lib/report/columns.h
lib/report/report.c
This page took 0.032136 seconds and 5 git commands to generate.