mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-30 01:47:56 +03:00
6d7dc87cb3
Previously, pvmove used the function find_pv_in_vg() which did the equivalent of process_each_pv() by doing: find_pv_by_name() -> get_pvs() -> get_pvs_internal() -> _get_pvs() -> get_vgids() -> /* equivalent to process_each_pv */ dm_list_iterate_items(vgids) vg = vg_read_internal() dm_list_iterate_items(&vg->pvs) With the found 'pv', it would do vg_read() on pv_vg_name(pv), and then do the actual pvmove processing. This commit simplifies by using process_each_pv() and putting the actual pvmove processing into the "single" function. This eliminates both find_pv_by_name() and the vg_read(). The processing code that followed vg_read remains the same. The return code for the pvmove command is not based on the process_each_pv return code, but is based on the success/fail conditions in the existing code.