1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-30 01:47:56 +03:00
David Teigland 6d7dc87cb3 pvmove: use toollib
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.
2016-01-18 14:48:30 -06:00
..
2015-12-14 14:26:47 -06:00
2015-11-09 17:04:10 +01:00
2015-12-01 09:36:52 -06:00
2008-01-30 14:00:02 +00:00
2015-07-06 17:30:18 +01:00
2008-01-30 14:00:02 +00:00
2015-12-09 11:59:49 -06:00
2015-12-11 20:15:51 +01:00
2015-07-02 15:42:26 -05:00
2016-01-18 14:48:30 -06:00
2015-07-02 15:42:26 -05:00
2015-12-14 14:26:47 -06:00
2014-01-30 13:09:15 +00:00
2015-07-06 17:30:18 +01:00
2016-01-18 14:48:30 -06:00
2016-01-13 16:40:02 -06:00
2015-12-03 18:17:45 +01:00
2015-07-02 15:42:26 -05:00
2015-12-14 14:26:47 -06:00
2015-07-02 15:42:26 -05:00