1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

13815 Commits

Author SHA1 Message Date
David Teigland
15f51bc421 commands: avoid factoring options until needed 2017-02-16 09:37:28 -06:00
David Teigland
22bee4fbdb help/man: remove commas from list of options
Using commas between options does not seem to
be done anywhere else, so remove them.
2017-02-15 15:51:46 -06:00
David Teigland
81c0ed9fc6 commands: use dm wrappers for malloc/free 2017-02-15 15:49:18 -06:00
David Teigland
6a5c9ba349 commands: use existing vg/lv name parsing functions
inside the new lv arg parsing function.

This includes getting the VG name from the env var,
and some added checks on the format of the vg/lv string.
2017-02-15 15:28:54 -06:00
David Teigland
2556498ee1 lvcreate: fix LVM_VG_NAME detection
Commit d3af0e7528 was
not quite right in testing if the env var was set.
2017-02-15 14:10:46 -06:00
David Teigland
4a30f5f9b0 toollib: skip dev prefix from lv names
_get_arg_lvnames_using_options() was missing skip_dev_dir()
2017-02-15 13:42:35 -06:00
David Teigland
286d39ee3c lvconvert: handle old arg quirk when combining snapshot
The old ad hoc arg parsing when combining a split snapshot
allowed the first lv to have a vgname, but not the second.
Since lvconvert now uses the standard arg parsing in
process_each_lv(), the old one-off behavior requires a
work around.
2017-02-15 12:40:35 -06:00
David Teigland
d3af0e7528 lvcreate: LVM_VG_NAME applies even without name arg
There was a small flaw in the logic regarding when LVM_VG_NAME
can replace a VG position arg.
2017-02-15 12:07:51 -06:00
David Teigland
7417c8acfa Revert "lvconvert: enable previous syntax to swap metadata"
This reverts commit 717363bb94.

These alternate forms for swapping metadata cannot be
distinguished from the command for creating a pool.
If we were to add these alternate forms for swapping
metadata, we would need to overload the pool creation
command defs, making those definitions ambiguous.
2017-02-14 16:02:54 -06:00
David Teigland
d2c5bb5c70 coverity cleanups 2017-02-14 15:53:29 -06:00
David Teigland
1236e0ed29 man-generator: fix compiler warnings 2017-02-14 10:28:52 -06:00
David Teigland
1dddb068c9 man/help: use separator in units list
h|H|b|B|... instead of hHbB...
2017-02-14 10:21:39 -06:00
David Teigland
c0f2a59993 commands: skip parsing command defs for other command names
The base command name can be used to skip parsing
command defs that will not be needed.
2017-02-14 10:16:13 -06:00
David Teigland
f46b28bdb6 commands: improve help/usage output
Replace --help --help with --long-help.
Some blank lines were needed.
Add 'lvm help all' to print help for all commands.
2017-02-14 09:52:09 -06:00
Alasdair G Kergon
c868562a79 Makefile: all_man also requires man-generator now 2017-02-14 13:24:31 +00:00
Zdenek Kabelac
22457ed4d9 makefiles: missing deps 2017-02-14 10:24:56 +01:00
Zdenek Kabelac
fc0e49297d makefiles: use configure vars
Use binaries found in configure.
2017-02-14 10:24:56 +01:00
Zdenek Kabelac
3350eb67cc libdm: move code for _stats_resize_group
Code is only needed when "fiemap.h" so keep it under single #ifdef.
2017-02-14 10:24:56 +01:00
Zdenek Kabelac
6118b0fb93 configure: update 2017-02-14 00:05:04 +01:00
Zdenek Kabelac
65b82a8072 activation: trust 'pending' status reported by dmeventd
Only usleep when dmeventd reports 'pending' otherwise trust reported
state.
2017-02-14 00:04:26 +01:00
Zdenek Kabelac
05dd566a52 dmeventd: unify error handling
Always make sure the 'status' is release on 'error' path (thin pluging missed)
Make code looking same across all plugins.
2017-02-14 00:03:34 +01:00
David Teigland
5a87d8667d coverity cleanups for recent command defs commits 2017-02-13 16:11:04 -06:00
David Teigland
5ab051df7a WHATS_NEW: changes for recent command defs 2017-02-13 15:36:17 -06:00
David Teigland
c816e8b636 WHATS_NEW: items from command definitions patch set 2017-02-13 15:22:26 -06:00
David Teigland
717363bb94 lvconvert: enable previous syntax to swap metadata 2017-02-13 14:41:54 -06:00
David Teigland
b2fd5b31d3 commands: suggest --help if command doesn't match 2017-02-13 13:46:17 -06:00
David Teigland
698abdde16 generate man pages 2017-02-13 10:31:23 -06:00
David Teigland
13a6368522 args: use arg parsing function for region size
Consolidate the validation of the region size arg
in a new arg parsing function.
2017-02-13 08:21:58 -06:00
David Teigland
a1386dcca0 lvconvert: remove code for changing region size
from the generic raid type conversion code.
2017-02-13 08:21:58 -06:00
David Teigland
46abc28a48 lvconvert: add command to change region size of a raid LV 2017-02-13 08:21:58 -06:00
David Teigland
8152e4a99e vgchange: fix uint32 parsing of logicalvolume arg 2017-02-13 08:20:10 -06:00
David Teigland
2224b6a701 commands: recognize raid variations 2017-02-13 08:20:10 -06:00
David Teigland
c3faa5816d commands: move command def parsing into lvm binary
It was previously done at build time by the ccmd binary.
2017-02-13 08:20:10 -06:00
David Teigland
942dc07402 lvconvert: remove unused code
For "split" which is not an alias for splitmirrors.
2017-02-13 08:20:10 -06:00
David Teigland
f067c0ad78 args: split is a synonym for splitcache
also tidy the other synonyms
2017-02-13 08:20:10 -06:00
David Teigland
c3e1838382 man: lvmthin updates
Some minor changes to some of the command syntaxes
to use more standard forms.
2017-02-13 08:20:10 -06:00
David Teigland
15d9f2850e ccmd: split into multiple files 2017-02-13 08:20:10 -06:00
David Teigland
013c080756 command struct: remove command name refs
Change run time access to the command_name struct
cmd->cname instead of indirectly through
cmd->command->cname. This removes the two run time
fields from struct command.
2017-02-13 08:20:10 -06:00
David Teigland
d9d5b8414b command.h comment tidying 2017-02-13 08:20:10 -06:00
David Teigland
9a0f0c70bf lvm shell: clear argv for each command 2017-02-13 08:20:10 -06:00
David Teigland
23a1ced439 help: accept positional args
lvm help <commandname> ...
2017-02-13 08:20:10 -06:00
David Teigland
3642deb4f3 fix lvmcmdline warning
declaration of ‘usage’ shadows a globa
2017-02-13 08:20:10 -06:00
David Teigland
4d2c3502e7 man lvm: remove options
all options are now included in commands
2017-02-13 08:20:10 -06:00
David Teigland
5c779b3231 args: add man page descriptions 2017-02-13 08:20:10 -06:00
David Teigland
db26a82f2f args: use uint32 arg for maxphysicalvolumes 2017-02-13 08:20:10 -06:00
David Teigland
041c2fef88 lvconvert: remove unused code 2017-02-13 08:20:10 -06:00
David Teigland
46b2599d5c lvconvert: use command defs for raid/mirror types
All lvconvert functionality has been moved out of the
previous monolithic lvconvert code, except conversions
related to raid/mirror/striped/linear.  This switches
that remaining code to be based on command defs, and
standard process_each_lv arg processing.  This final
switch results in quite a bit of dead code that is
also removed.
2017-02-13 08:20:10 -06:00
David Teigland
a801b92b2c tests: use swapmetadata
and some other pool/cache/thin related changes
2017-02-13 08:20:10 -06:00
David Teigland
86d8ab493b lvconvert: use command defs for mergemirrors
and route the generic --merge to one of the
specific merge functions
2017-02-13 08:20:10 -06:00
David Teigland
95e38607ec toollib: find VG name in option values when needed 2017-02-13 08:20:10 -06:00