1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/tools
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
..
.exported_symbols generate liblvm2cmd exported symbols too 2010-06-25 18:23:10 +00:00
.gitignore gitignore: Update for in-place build. 2015-07-27 13:18:35 +01:00
args.h lvmconfig: add --sinceversion for --type new 2015-11-25 14:12:12 +01:00
cmdnames.h Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
commands.h vgrename: use process_each_vg 2015-12-14 14:26:47 -06:00
dmsetup.c dmsetup: one missed dms 2015-11-09 17:04:10 +01:00
dumpconfig.c cleanup: clean gcc shadow declaration of version warning 2015-11-26 21:52:22 +01:00
errors.h lvresize: separate validation from action 2013-07-06 03:28:21 +01:00
formats.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvchange.c segtypes: Add and use new segtype macros. 2015-09-24 14:59:07 +01:00
lvconvert_poll.c thin: improve swapping of identifiers 2015-09-11 21:51:11 +02:00
lvconvert_poll.h polldaemon: move lvconvert_get_copy_lv code 2015-05-04 16:56:39 +02:00
lvconvert.c lvconvert: Reinstate raid merge after splitmirror. 2015-12-03 17:40:10 +00:00
lvcreate.c lvcreate: use process_each_vg 2015-12-01 09:36:52 -06:00
lvdisplay.c tools: allow -S|--select for vgdisplay, lvdisplay and pvdisplay without -C 2015-02-10 16:09:40 +01:00
lvextend.c Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
lvm2cmd-static.c Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
lvm2cmd.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvm2cmd.h lvresize: separate validation from action 2013-07-06 03:28:21 +01:00
lvm2cmdline.h toolcontext: add switches to create_toolcontext for connections and filters init 2015-07-30 13:54:09 +02:00
lvm-static.c include: Standardise around new tool.h. 2015-07-06 17:30:18 +01:00
lvm.c include: Standardise around new tool.h. 2015-07-06 17:30:18 +01:00
lvmchange.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvmcmdlib.c tools: update for lvm2_disable_dmeventd_monitoring 2015-10-23 10:54:13 +02:00
lvmcmdline.c segtypes: Use SEG_TYPE_NAME_ string constants. 2015-09-22 19:04:12 +01:00
lvmdiskscan.c filters: add cmd->full_filter - composite of cmd->filter and cmd->lvmetad_filter 2014-10-02 13:06:46 +02:00
lvpoll.c include: Standardise around new tool.h. 2015-07-06 17:30:18 +01:00
lvreduce.c Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
lvremove.c cleanup: tools: "or use -S for selection" --> "or use --select for selection" 2015-03-04 14:40:58 +01:00
lvrename.c lvrename: move the lvmlockd LV lock 2015-12-09 11:59:49 -06:00
lvresize.c lvresize: check for poolmetadatasize arg earlier 2016-01-14 11:34:04 +01:00
lvscan.c reporting: should not fail with foreign option if lvm1 pvs exist 2015-03-10 13:56:25 -05:00
Makefile.in fix static linking 2015-12-11 20:15:51 +01:00
polldaemon.c vgextend: pass single vgname as process_each_vg arg 2015-12-01 09:36:45 -06:00
pvchange.c pvchange, pvresize: fix lockd_gl() usage 2016-01-18 09:35:06 -06:00
pvck.c pvck: Use non-zero exit status after failure. 2014-11-13 12:26:43 +00:00
pvcreate.c Add lvmlockd 2015-07-02 15:42:26 -05:00
pvdisplay.c tools: allow -S|--select for vgdisplay, lvdisplay and pvdisplay without -C 2015-02-10 16:09:40 +01:00
pvmove_poll.c include: Standardise around new tool.h. 2015-07-06 17:30:18 +01:00
pvmove_poll.h polldaemon: refactor polling interfaces 2015-05-05 20:52:07 +02:00
pvmove.c pvmove: use toollib 2016-01-18 14:48:30 -06:00
pvremove.c Add lvmlockd 2015-07-02 15:42:26 -05:00
pvresize.c pvchange, pvresize: fix lockd_gl() usage 2016-01-18 09:35:06 -06:00
pvscan.c pvscan: restore polling in autoactivation handler 2016-01-12 11:40:43 +01:00
reporter.c vgrename: use process_each_vg 2015-12-14 14:26:47 -06:00
segtypes.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
stub.h Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
tags.c tools: Add internal tags command. 2014-01-30 13:09:15 +00:00
tool.h include: Standardise around new tool.h. 2015-07-06 17:30:18 +01:00
toollib.c Revert "Revert "process_each_pv: remove unnecessary workaround"" 2016-01-18 09:36:55 -06:00
toollib.h pvmove: use toollib 2016-01-18 14:48:30 -06:00
tools.h pvscan: restore polling in autoactivation handler 2016-01-12 11:40:43 +01:00
vgcfgbackup.c vgextend: pass single vgname as process_each_vg arg 2015-12-01 09:36:45 -06:00
vgcfgrestore.c vgcfgrestore: return invalid cmd line 2014-05-21 23:14:41 +02:00
vgchange.c vgchange: fix lockd_gl results 2016-01-13 16:40:02 -06:00
vgck.c vgextend: pass single vgname as process_each_vg arg 2015-12-01 09:36:45 -06:00
vgconvert.c vgextend: pass single vgname as process_each_vg arg 2015-12-01 09:36:45 -06:00
vgcreate.c lockd: add start_init arg to lockd_start_vg 2015-09-10 09:47:26 -05:00
vgdisplay.c vgextend: pass single vgname as process_each_vg arg 2015-12-01 09:36:45 -06:00
vgexport.c vgextend: pass single vgname as process_each_vg arg 2015-12-01 09:36:45 -06:00
vgextend.c vgextend: reinstantiate archiving 2015-12-03 18:17:45 +01:00
vgimport.c vgextend: pass single vgname as process_each_vg arg 2015-12-01 09:36:45 -06:00
vgmerge.c Add lvmlockd 2015-07-02 15:42:26 -05:00
vgmknodes.c toollib: replace void *handle with struct processing_handle for use in processing functions (process_each_*/process_single_* and related) 2015-02-10 16:05:24 +01:00
vgreduce.c coverity: fix missing initialization 2015-07-08 14:53:30 +02:00
vgremove.c vgextend: pass single vgname as process_each_vg arg 2015-12-01 09:36:45 -06:00
vgrename.c vgrename: use process_each_vg 2015-12-14 14:26:47 -06:00
vgscan.c vgextend: pass single vgname as process_each_vg arg 2015-12-01 09:36:45 -06:00
vgsplit.c Add lvmlockd 2015-07-02 15:42:26 -05:00