]> sourceware.org Git - lvm2.git/commit
mirror/raid: Move 'copy_percent' to common code (mirror.c -> lv_manip.c)
authorJonathan Brassow <jbrassow@redhat.com>
Wed, 24 Oct 2012 01:33:54 +0000 (20:33 -0500)
committerJonathan Brassow <jbrassow@redhat.com>
Wed, 24 Oct 2012 01:33:54 +0000 (20:33 -0500)
commit6db461e3b0d3fbc394fe2ed2a7d6a3c070453874
treeccf456a9bd8f87318923536b031c8d9f587895ca
parent8073ce16900def5a200fce44cb69862bfc50d4ce
mirror/raid:  Move 'copy_percent' to common code (mirror.c -> lv_manip.c)

The 'copy_percent' function takes the 'extents_copied' field from each
segment in an LV to create the numerator for the ratio that is to
become the copy_percent.  (Otherwise known as the 'sync' percent for
non-pvmove uses, like mirror LVs and RAID LVs.)  This function safely
works on RAID - not just mirrors - so it is better to have it in
lv_manip.c rather than mirror.c.

There's a lot of different functions that do a lot of different things
in lv_manip.c, so I placed the function near a function in lv_manip.c
that it was close to in metadata-exported.h.  Different placement in the
file or a different name for the function may be useful.
lib/metadata/lv_manip.c
lib/metadata/metadata-exported.h
lib/metadata/mirror.c
This page took 0.039033 seconds and 5 git commands to generate.