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

3774 Commits

Author SHA1 Message Date
Alasdair G Kergon
5684cfcb1c report: Add metadata_percent to lvs_cols. 2014-05-15 08:32:27 +01:00
Alasdair G Kergon
3b989e317f allocation: Fix alloc anywhere with parity.
Take account of parity areas with alloc anywhere in
_calc_required_extents.  Extents beyond area_count were treated
incorrectly as mirror logs.
2014-05-14 16:25:43 +01:00
Zdenek Kabelac
85cf5a23d2 cleanup: improve error message
Update impossile to happen error message.
2014-05-13 10:33:17 +02:00
Zdenek Kabelac
c07fb7678e cleanup: drop unused header 2014-05-12 16:24:40 +02:00
Zdenek Kabelac
8b95c82fed coverity: catch unwanted path
We validate this path already earlier.
2014-05-12 16:24:39 +02:00
Zdenek Kabelac
5b787a24f0 configure: drop siginterrupt
Not used anymore
2014-05-12 16:24:39 +02:00
Zdenek Kabelac
e416d84e10 cleanup: use enum return codes 2014-05-07 14:17:46 +02:00
Zdenek Kabelac
2cc02c570e cleanup: constify pointers 2014-05-07 14:17:46 +02:00
Zdenek Kabelac
9845f8c767 clenaup: drop unused assigns 2014-05-07 14:17:46 +02:00
Zdenek Kabelac
d3e68c8a71 cleanup: cosmetics.
Initialized attrs so analyzers are less confused
(since currently our method calls should always initialize attrs on
return).
2014-05-07 14:17:46 +02:00
Zdenek Kabelac
d88fab8d3a cleanup: drop uneeded headers 2014-05-07 14:17:45 +02:00
Zdenek Kabelac
bcd6deea18 coverity: ignore ret val
Since we intentionaly do not want to check them,
cast result values to void.
2014-05-07 14:17:12 +02:00
Zdenek Kabelac
d11617864a coverity: error for undefined origin
If we would have been missing origin here, it would
be an internal error - since these values are validated
earlier.
2014-05-07 14:16:18 +02:00
Zdenek Kabelac
a8042f33d0 coverity: check for profile
Ensure str is not NULL for analyzer.
2014-05-07 14:15:52 +02:00
Zdenek Kabelac
48a8cf28f7 cache: avoid expression overflow
Cast data_extents to 64bit so calculation is in 64b arithmetic.
2014-05-07 14:14:54 +02:00
Zdenek Kabelac
e585a6bbcf signals: better nesting support
Support upto 3 levels os nesting signal blocking.
As of today - code blocks signals immediatelly when it opens
VG in read-write mode - this however makes current prompt usage
then partially unusable since user may not 'break' command
during prompt (something most user would expect).

Until a better fix for prompting is implemented, put in support
for signal nesting - thus when prompt enables signal acceptance,
make it possible to really break command at this point.
2014-05-07 14:09:33 +02:00
Zdenek Kabelac
31ac200a37 debug: add more debug message for signal handling
Adding log_sys_debug for eventual logging of system errors.
(Using debug level, since currently signal handling functions
do not fail when any error is encoutered).
2014-05-07 14:07:13 +02:00
Zdenek Kabelac
04b29a3587 locking: use sigaction signal handling
Use sigint_allow/restore function instead of duplicating code
and switch to use only sigactiction based signal handling.
2014-05-07 14:01:13 +02:00
Peter Rajnoha
1899783aa6 cleanup: fix compiler warning
locking/file_locking.c:162:2: warning: implicit declaration of function ‘init_signals’
2014-05-06 14:38:38 +02:00
Alasdair G Kergon
09064cc2db signals: Add init_signals. 2014-05-01 20:31:19 +01:00
Alasdair G Kergon
2eed136f0f signals: Move sigint handling out to lvm-signal. 2014-05-01 20:07:17 +01:00
Alasdair G Kergon
29a3fbf067 locking: Separate out flock and signal code. 2014-05-01 17:37:14 +01:00
Zdenek Kabelac
9401827919 cleanup: modules_needed only for devmapper
Drop compilation of modules_needed and add_target_lin
function when compiled without devmapper support.
Cleanup surrounding ifdefs.
2014-04-30 10:26:30 +02:00
Zdenek Kabelac
62e8dd4f6e cleanup: indent 2014-04-30 10:26:30 +02:00
Zdenek Kabelac
b56aef1915 unknown: add_target_line is not needed
Leave addition of unknown segment to table as internal error.
Do not replace unknown segment with error device.
2014-04-30 10:26:30 +02:00
Zdenek Kabelac
62ad6dee18 lv: show X attr when lv_info fails
Print 'X' also when lv_info() fails.
(i.e. compilation with --disable-ioctl)
2014-04-30 10:26:29 +02:00
Zdenek Kabelac
675fcfe9b7 devmapper: fix compilation without devmapper
Fix compilation when configured with --disable-devmapper option.
2014-04-30 10:26:29 +02:00
Zdenek Kabelac
517b002648 display: check for dmeventd support
When quering for dmeventd monitoring status, check first
if lvm2 is configured to monitor to avoid unwanted start
of dmeventd process for answering monitoring status.
2014-04-30 10:26:26 +02:00
Zdenek Kabelac
d8214cb154 cleanup: put all tests within switch
No reason to check for VALID in extra if.
2014-04-28 12:42:56 +02:00
Zdenek Kabelac
4c405a9b49 thin: move segment info display to correct code section
Relocate info from thin pool and thin volume segments
to proper code section for segments.
Add discards and thin count status info.

Info is shown with  'lvdisplay --maps' (like for other segments).
2014-04-28 12:41:25 +02:00
Zdenek Kabelac
71314a9905 thin: display info when -tpool is running
For percentage display we need -tpool - so check for layered
device presence here instead of plain pool device.
Also update 'info' - so when pool is 'available' we
display open count for -tpool device instead of mostly
irrelevant pool.
TODO: Maybe we should actually display this open info always?
(even when just -tpool is available, but pool is not)
2014-04-28 12:40:17 +02:00
Zdenek Kabelac
91a8e4a3d8 display: show monitoring status
When displaying segments  (lvdisplay --maps)
show monitoring status when supported by segment.
2014-04-28 12:39:03 +02:00
Zdenek Kabelac
e6168b8d70 display: use Virtual for virtual LV
Emphesize virtual extents for virtual LVs and for
those use  'Virtual extents' instead of 'Logical extents',
so it's immeditatelly visible, which extents do have
straighforward physical backend.
2014-04-28 12:37:50 +02:00
Peter Rajnoha
5b28cbd7c2 cleanup: _move_pv is static
metadata/metadata.c:363:5: warning: no previous prototype for '_move_pv' [-Wmissing-prototypes]
2014-04-28 12:11:44 +02:00
Peter Rajnoha
4360fdf89c libdevmapper: add dm_units_to_factor for size unit parsing
Actually moving the existing code from LVM to libdm for reuse.
2014-04-28 10:25:43 +02:00
Jonathan Brassow
9ac858fe6b vgsplit: Make vgsplit work on mirrors with leg and log on same PV
Given a named mirror LV, vgsplit will look for the PVs that compose it
and move them to a new VG.  It does this by first looking at the log
and then the legs.  If the log is on the same device as one of the mirror
images, a problem occurs.  This is because the PV is moved to the new VG
as the log is processed and thus cannot be found in the current VG when
the image is processed.  The solution is to check and see if the PV we are
looking for has already been moved to the new VG.  If so, it is not an
error.
2014-04-25 14:53:34 -05:00
Peter Rajnoha
8e8a47143f config: use devices/ignore_suspended_devices=0 by default
ignore_suspended_devices=0 is already used in lvm.conf we distribute,
but it was still "1" in the code (so it was used when lvm.conf value
was not defined). It should be "0" too.
2014-04-24 12:12:39 +02:00
Zdenek Kabelac
559c003ee2 cleanup: reduce inclusion of unnecessary headers
Remove those file which are not needed by .c files
or already include because the headers already needs them.
2014-04-18 16:38:50 +02:00
Zdenek Kabelac
589983a257 cleanup: include stdarg.h where needed.
Avoid dependency on implicit inclusion of stdarg.h with
libdevmapper.h.
2014-04-18 16:38:50 +02:00
Zdenek Kabelac
0e05e1cf6c asprintf: fix test for error result
On error this function returns -1. Since the functions however
do not propagate error upward, it's rather cleanup change.
2014-04-18 16:38:47 +02:00
Zdenek Kabelac
47a60369a0 unknown: fix mempool used for name allocation
Use cmd libmem mempool for name allocation, since mem mempool
is released after each clvmd command.
2014-04-18 16:38:47 +02:00
Alasdair G Kergon
b5f8f452ac tools: Add --readonly support.
Offer lock-free access to display virtual machine or clustered VG metadata
while it might be in use.
2014-04-18 02:46:34 +01:00
Alasdair G Kergon
17e304e0ac metadata: Fix unlock on VG recovery error path.
If lock conversion failed it tried to unlock VG that was no longer locked.
2014-04-18 02:27:16 +01:00
Alasdair G Kergon
177ece01a9 reports: Use X for unknown LV attr when no dm.
It's safer not to tell people an LV is inactive when we aren't sure.
2014-04-18 02:23:39 +01:00
Alasdair G Kergon
8980592514 alloc: Correct existing use of positional fill.
Perform two allocation attempts with cling if maximise_cling is set,
first with then without positional fill.

Avoid segfaults from confusion between positional and sorted sequential
allocation when number of stripes varies as reported here:
https://www.redhat.com/archives/linux-lvm/2014-March/msg00001.html
2014-04-15 02:34:35 +01:00
Alasdair G Kergon
1bf4c3a1fa alloc: Introduce A_POSITIONAL_FILL.
Set A_POSITIONAL_FILL if the array of areas is being filled
positionally (with a slot corresponding to each 'leg') rather
than sequentially (with all suitable areas found, to be sorted
and selected from).
2014-04-15 01:13:47 +01:00
Alasdair G Kergon
c9a8264b8b alloc: Access alloc_parms from alloc_state.
alloc_parms is constant while allocating.
2014-04-15 01:05:34 +01:00
Zdenek Kabelac
1d803ee980 cleanup: corrent indent level 2014-04-14 13:02:28 +02:00
Zdenek Kabelac
bd3e44643d memlock: ignore more libraries
Extend the list of ignored libraries. Since we do not
use those libraries during suspend, skip their locking.
2014-04-14 12:53:07 +02:00
Zdenek Kabelac
84ff3ae703 pvmove: remove locked flag from error pvmove0
When pvmove0 is finished, it replaces temporarily pvmove0
with error segment, however in this case, pvmove0 remains
unremovable in case pvmove --abort is interrupted in this
moment - since it's not a pvmove anymore and normal
lvremove can't be used to remove LOCKED lv.
2014-04-14 12:52:32 +02:00