Zdenek Kabelac
cc525412f1
Keep page_size as signed number
...
Since it's return value from sysconf and is checked for <0.
2012-02-08 11:34:46 +00:00
Zdenek Kabelac
962fd76f26
Move done jump lower
...
Since before 'goto done' is bufused zeroed, it would otherwise write 1
byte in front of buffer.
2012-02-08 11:31:29 +00:00
Zdenek Kabelac
6e40adde76
Add boundary test for number of mirror devs and logs
...
As atoi may return negative value - test for both limits.
Test log_args for limits before calling alloca().
Code from dmeventd mirror plugin should probably share same code as
we have in mirrored.c.
2012-02-08 11:29:13 +00:00
Zdenek Kabelac
fb6a209080
Set all parameters to 0
...
Since the function dm_get_next_target() returns NULL as 'next' pointer
so it's not a 'real' error - set 0 to all parameters when NULL is
returned because of missing head.
i.e. one of use case::
do {
next = dm_get_next_target(dmt, next, &start, &length,
&target_type, ¶ms);
size += length;
} while (next);
2012-02-08 11:25:09 +00:00
Zdenek Kabelac
e6b610e8ed
Check that whole locking_dir fits _lock_dir buffer
2012-02-08 11:17:34 +00:00
Zdenek Kabelac
bb0862fbb4
Move close few lines
...
Since the function dev_close() has code path, which really could close
file (for unlocked vg) and destroy dev handler, stay on safe side and move
the close few lines later, even our current use case shouldn't trigger
such scenario.
2012-02-08 11:15:38 +00:00
Zdenek Kabelac
e2d2f6c7b7
Use dm_list_iterate_items_safe
...
And avoid direct access to list member variables.
Inline _free_li().
2012-02-08 11:12:18 +00:00
Zdenek Kabelac
e48d39cba0
Fix fd resource leak in error path
...
Use 'goto bad' to cleanup fd on error path.
2012-02-08 11:07:17 +00:00
Zdenek Kabelac
4443aa41cc
Ensure strncpy() function always ends with '\0'
...
Since last character needs to be \0 for string,
pass buffer size smaller by 1 byte.
2012-02-08 11:05:04 +00:00
Zdenek Kabelac
24da0046d5
Set status for error path
...
Do not leave status unitialized, since in some cases, it's tested,
when the function returns error.
2012-02-08 10:56:17 +00:00
Zdenek Kabelac
8d9b4b0133
Add missing deps for lvm2api
...
Hmm, wasted some time because of this missing deps....
2012-02-08 10:52:45 +00:00
Zdenek Kabelac
328ed80160
Fix resource leaks for failing allocation
...
In case, something would fail during format initialization,
return allocated memory.
2012-02-08 10:49:36 +00:00
Zdenek Kabelac
582c94aa21
Release allocated resources in error path
...
If composite_filter_create() fails, release filters.
2012-02-08 10:46:24 +00:00
Zdenek Kabelac
38188ff8aa
Check result of lstat
...
If lstat returns errno different from ENOENT, do not use the content of
struct stat 'buf'.
2012-02-08 10:43:42 +00:00
Petr Rockai
c84c7ee034
What's new.
2012-02-01 20:13:44 +00:00
Petr Rockai
a3ac5a54d0
Remove a dubious log message ("another thread is handling an event") from LVM
...
dmeventd plugins. Fixes RHBZ 771419.
2012-02-01 20:11:58 +00:00
Alasdair Kergon
b93aa9eac4
post-release
2012-02-01 18:46:57 +00:00
Alasdair Kergon
d8e7d0e2bd
pre-release
2012-02-01 15:17:04 +00:00
Alasdair Kergon
759f5b3349
Adjust comments
2012-02-01 15:05:53 +00:00
Zdenek Kabelac
433c583cd7
Add synchornization point in mirror log init.
...
Put extra sync point when mirror log is deactivated and before
it's activated for the second time.
2012-02-01 13:50:36 +00:00
Zdenek Kabelac
02f6f4902f
Disable partial activation for thin LVs and LVs with all missing segments
...
Count number of error and existing areas and if there is no existing area
for the LV avoid its activation.
Always disable partial activatio for thin volumes.
For mirrors currently put in hack to let it pass with a special name
since current mirror code needs to activate such LV during some operations.
2012-02-01 13:47:27 +00:00
Zdenek Kabelac
90fd0f5b42
Avoid warning for small pv_min_size
...
Do not print warning for pv_min_size set in range between 512KB and 2MB.
2012-02-01 13:42:18 +00:00
Peter Rajnoha
56f6e9310d
Clean up systemd unit ordering and requirements.
2012-02-01 13:08:39 +00:00
Zdenek Kabelac
8bec4f1a79
Minor consistency update for debugging messages
...
Use mlock/munlock for debugging lines.
2012-02-01 10:48:22 +00:00
Zdenek Kabelac
f00a162500
User correct base dir for lcov reports
...
Fix problem when srcdir != builddir.
2012-02-01 10:46:45 +00:00
Alasdair Kergon
1228bcaa0d
lost line
2012-02-01 02:11:43 +00:00
Alasdair Kergon
b94b757e1e
Track unreserved space for all alloc policies and then permit NORMAL to place
...
log and data on same single PV.
2012-02-01 02:10:45 +00:00
Alasdair Kergon
49fd0fef6b
lp.pool may be (null) too
2012-02-01 01:54:20 +00:00
Alasdair Kergon
8416129244
Automatically detect whether corosync clvmd needs to use confdb or cmap. (fabio)
2012-01-31 21:21:53 +00:00
Zdenek Kabelac
b329581e8e
Fix data% reporting
...
For reading % of mapped size of thin volume use as origin for
old style snapshot '-real' device needs to be queried.
Fix log_error report given for lvs -a in this case.
2012-01-28 20:12:26 +00:00
Zdenek Kabelac
0117473049
TARGETS macro has to be defined before inclusion of make.tmpl
...
Use @TESTING@ check in this case.
2012-01-27 10:55:02 +00:00
Alasdair Kergon
09e8d81a53
post-release
2012-01-27 01:23:40 +00:00
Zdenek Kabelac
317325ed54
Build test run target only for $(TESTING)
...
Add libraries properly in LDLIBS.
2012-01-26 21:40:36 +00:00
Zdenek Kabelac
6f9deb5b47
Thin for_each_sub_lv
...
Adapt to scan thin dependency LVs
2012-01-26 21:39:32 +00:00
Zdenek Kabelac
21fc2af47e
If clvmd is not started, die test instead of skipping it
2012-01-26 18:25:46 +00:00
Zdenek Kabelac
3d0906496b
Oops missed braces in previous commit
...
This has disabled clvmd for being executed.
(FIXME improve testing part to catch this fault)
2012-01-26 17:55:55 +00:00
Alasdair Kergon
f47f37485e
pre-release
2012-01-26 14:02:42 +00:00
Alasdair Kergon
3876196da4
pre-release
2012-01-26 10:11:30 +00:00
Zdenek Kabelac
808f1706c2
Cosmetic change use return macro with implicit stack
2012-01-25 22:38:40 +00:00
Zdenek Kabelac
0f5dc427f6
Set missing header define
2012-01-25 22:37:48 +00:00
Zdenek Kabelac
28de76ed58
Fix leak of hash table
...
Minor leak on command initialization.
2012-01-25 22:36:33 +00:00
Zdenek Kabelac
4e9ef2eea3
Instrument code that pointer are already released
...
Set pointers to NULL since on the function exit they are no longer valid.
2012-01-25 22:35:36 +00:00
Zdenek Kabelac
a1f42a8e88
Set to a defined value vars used after error path
...
Static analyzer noticed this vars are used even when error is reported
back thus their state is undefined - set to 0 for this case.
2012-01-25 22:20:11 +00:00
Zdenek Kabelac
baffb459d8
Test for uname result
...
in fail path initialize to 0.
2012-01-25 22:17:57 +00:00
Zdenek Kabelac
381deeed8f
Fix missing dmt destructor
...
Also always initialize maj,min,patchlevel when success is returned.
2012-01-25 22:16:04 +00:00
Zdenek Kabelac
6f37aa5e65
Free allocated segment type in error path
2012-01-25 21:54:00 +00:00
Zdenek Kabelac
4343bc5e86
Limit alignment to 32bit values
...
to get the same behavior on 32/64 machines.
2012-01-25 21:52:53 +00:00
Zdenek Kabelac
255e8cb60b
Ensure whole info is initialised
...
Since _create_dm_tree_node is copying whole structure,
make sure all members are initialized.
2012-01-25 21:50:50 +00:00
Zdenek Kabelac
6bd7f256ae
Fix resource leak of file handle
...
Introduces when added dm_device_get_name.
Close file handle in all error paths.
2012-01-25 21:47:18 +00:00
Zdenek Kabelac
5d1d269f45
Check for correctness of uint64 value if exists
2012-01-25 21:43:51 +00:00