[linux-lvm] [PATCH LVM2] (2/3) use _for_each_pv() from _check_contiguous()
j-nomura at ce.jp.nec.com
Fri Oct 6 21:56:06 UTC 2006
This patch rewrites _check_contiguous() to use _for_each_pv().
_for_each_pv() is a generic iterator function to execute given
function on each PV constituting the specified range of LV.
Since _check_contiguous() tries to find contiguous PV segment from
the end of the existing LV segment, I gave the last one LE as
a iteration range of _for_each_pv().
To pass necessary parameters to _for_each_pv callback (_match_pv()),
this patch adds new struct pv_match_handle.
The patch doesn't fix any bug but is a preparation for later patch.
Also, the use like this is what _for_each_pv() is intended for, I think.
lv_manip.c | 89 +++++++++++++++++++++++++++++++++++++++++++++----------------
1 file changed, 66 insertions(+), 23 deletions(-)
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3632 bytes
Desc: not available
More information about the linux-lvm