1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

5171 Commits

Author SHA1 Message Date
Zdenek Kabelac
d41c8aed57 Reset vg pointer after release
Set vg to NULL after releasing it as the following memlock() test may
lead to goto for the second call of vg_release() with the already
released vg pointer.
2010-11-29 11:08:14 +00:00
Zdenek Kabelac
fbf215ade2 Remove printing of LCK_CACHE
LCK_CACHE is defined as 0x100 so it cannot be passed through
unsigned char parameter - remove it from the sprintf code.

If the LCK_CLUSTER should be printed here - lot of code need
to be reworked - so adding FIXME comment.
2010-11-29 11:05:15 +00:00
Zdenek Kabelac
5b679c060d Fix check for empty system_dir
Fixing check for zero length system_dir string.
2010-11-29 10:58:32 +00:00
Zdenek Kabelac
acb88b5339 Cleanup remove test for NULL
dm_free is testing NULL itself
2010-11-29 10:11:50 +00:00
Mike Snitzer
c3d7df946e Fix "it's" typo to be "its" in lvconvert error message. 2010-11-28 18:37:33 +00:00
Petr Rockai
1dea3b9fab Update WHATS_NEW. 2010-11-25 17:16:41 +00:00
Petr Rockai
3801cb524c Disallow certain lvconvert operations that need to both allocate and free
extents, while physical volumes are specified. Fixes BZ 640051.
2010-11-25 17:15:46 +00:00
Petr Rockai
001b2c264b All 'size' values of lvm2app properties should be in bytes.
Fix 'seg_size' to return bytes.

Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-25 14:39:02 +00:00
Petr Rockai
f1e5a95d89 Add interactive tests for functions to lookup a pv|lv by name|uuid.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-25 14:35:46 +00:00
Petr Rockai
8779301c8d This patch adds helpers to allow users to lookup a lv or pv handle by
uuid (given a vg_t of course).

Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-25 14:34:51 +00:00
Petr Rockai
2ac0e8f989 This patch adds helpers to allow users to lookup a lv or pv handle by
name (given a vg_t of course).

Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-25 14:33:44 +00:00
Zdenek Kabelac
f912e2c887 Add missing destrustion of cmd_context
Lvm1 fallback code missed to destroy cmd_context in error path.
2010-11-24 09:53:31 +00:00
Zdenek Kabelac
732528e1c0 Fix memory leak in error path
Release allocated path buffer in error path.
2010-11-24 09:43:18 +00:00
Zdenek Kabelac
90222d0232 Fix resource leak of dlopened pointer
Add missing dlclose in _init_formats() error path.
Use return_0 to print stack trace from the call.
2010-11-24 09:34:34 +00:00
Zdenek Kabelac
85933f336c Add missing fclose
Fixing resource leak in _umount().

CHECKME: mountpoints with spaces need to be checked
2010-11-23 21:19:45 +00:00
Zdenek Kabelac
dc60e49a4d Move arg_vgnames from local scope
As gcc puts probably all vars on stack this bug was not noticed in runtime.
Patch fixes referencing local scope list variable.
2010-11-23 20:39:13 +00:00
Zdenek Kabelac
d1626c2433 Do not call dm_task_destroy with NULL 2010-11-23 18:29:06 +00:00
Zdenek Kabelac
2b3e80e233 Add missing closedir() - fixes resource leak 2010-11-23 15:28:54 +00:00
Zdenek Kabelac
0eb26e4582 Move va_end() so it is also used before error path return 2010-11-23 15:08:57 +00:00
Zdenek Kabelac
79a9cb910a Move va_end(ap) so we do not leave with return -1 without calling it.
Remove unneeded ';'
2010-11-23 15:00:52 +00:00
Alasdair Kergon
5b958643be Suppress 'No PV label' message when removing several PVs without mdas. 2010-11-23 01:55:53 +00:00
Alasdair Kergon
6e17f8809d Fix default /etc/lvm permissions to be 0755. (2.02.66) 2010-11-22 21:39:47 +00:00
Alasdair Kergon
75ab0236a9 post-release 2010-11-22 18:37:56 +00:00
Alasdair Kergon
4928dded55 pre-release 2010-11-22 14:25:22 +00:00
Alasdair Kergon
61325c32b0 Fix _output_field crash from field_id free with DEBUG_MEM. (Phillip Susi) 2010-11-19 13:17:27 +00:00
Petr Rockai
4f2136c654 The _free_vg that is created as a placeholder when reporting segments in pvs
was lacking the (vgmem) pool. We now create that pool. There is at least one
more such VG (_dummy_vg) which is pool-less. I am not sure what is the right
way to go about this, but this is currently necessary to fix a segfault
introduced by using vgmem in the reporter in Dave's lvseg lvm2app patches.

Signed-off-by: Petr Rockai <prockai@redhat.com>
2010-11-17 22:26:42 +00:00
Petr Rockai
9489a09e01 Update interactive tests for lvm2app lvseg and pvseg apis.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-17 20:13:51 +00:00
Petr Rockai
b55eb45e6a Add lvm2app function to query pvseg properties.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-17 20:12:39 +00:00
Petr Rockai
294097601d Add the macro and specific 'get' functions for pvsegs.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-17 20:11:27 +00:00
Petr Rockai
92afd60d92 Add a new type and function to lvm2app to enumerate pvsegs.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-17 20:10:42 +00:00
Petr Rockai
6bb64bc0b7 Add lvm2app function to query lvseg properties.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-17 20:09:42 +00:00
Petr Rockai
16138ebca3 Add the macro and specific 'get' functions for lvsegs.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-17 20:08:14 +00:00
Petr Rockai
bcf4cf83e4 Add a new type and function to lvm2app to enumerate lvsegs.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-17 20:07:01 +00:00
Petr Rockai
5d3834485e Make value.string const char *, in properties.h, to fix a warning introduced by
the previous patch set.
2010-11-17 19:50:15 +00:00
Petr Rockai
4bd06a929d Add vg_set_property to the interactive lvm2app test program.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-17 19:17:07 +00:00
Petr Rockai
9f8d31c4a2 Implement lvm_vg_set_property() by calling internal 'set' property function.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-17 19:16:05 +00:00
Petr Rockai
e01d8e9702 Add generic infrastructure to internal library to 'set' a property.
Similar to 'get' property internal functions.
Add specific 'set' function for vg_mda_copies.

Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-17 19:15:10 +00:00
Alasdair Kergon
212f7e0409 Remove tag length restriction and allow / = ! : # & characters. 2010-11-17 10:19:29 +00:00
Peter Rajnoha
676492a634 WHATS_NEW FIXME 2010-11-12 16:04:52 +00:00
Alasdair Kergon
39311f404e Support repetition of --addtag and --deltag arguments.
Add infrastructure for specific cmdline arguments to be repeated in groups.
Split the_args cmdline arguments and values into arg_props and arg_values.
2010-11-11 17:29:05 +00:00
Zdenek Kabelac
60b5c7dab1 Preserve const for char pointer
Keep char pointers 'const'  (introduced with cling commit).
2010-11-11 12:32:33 +00:00
Zdenek Kabelac
fe80296ff0 Add date configurable variable DATE
Follow the rule to run every command through variable dereference.
Add a runtime check of translated date to seconds.
2010-11-11 12:17:15 +00:00
Zdenek Kabelac
e945819706 fsadm fix for downsize of unmounted fs
Fix for the last commit as $MOUNTED is not only used as bool flag,
but also store mounted location for remount - so parsing output
from mount differently then from /proc/mounts.

Prefix calls of 'tunefs' tools with LANG=C to be sure we always do get
some nonlocalized strings.

Avoid using forced 'resize2fs' for cleanly unmounted filesystems and
run regular fsck -f for this case as required by resize2fs.

'fsadm check' uses date difference for extX filesystems between
the last mount and last check of 'fsck -f' execution and if the mount
was later run 'fsck' with -f so resize2fs is happy and user does not
need to pass '-f' flag.
2010-11-10 16:14:02 +00:00
Zdenek Kabelac
caad1b4ff9 Update fsadm regresion 2010-11-10 10:05:27 +00:00
Zdenek Kabelac
2286995abd Scan also 'mount' output for mounted filesystem.
As util-linux package seems to give all the time different names,
try harder to figure out, where is the given lv possible mounted
and scan /proc/mounts and if not found there, test also 'mount' output.

/dev/dm-xxx
/dev/mapper/vg-lv
/dev/vg/lv

All of them could be used different combination in /proc/mount and mount output.

Patch fixes regression for older systems where new detection code failed to
find valid combination.
2010-11-10 10:03:07 +00:00
Alasdair Kergon
3548ba3827 Extend cling allocation policy to recognise PV tags (cling_by_tags).
Add allocation/cling_tag_list to lvm.conf.
2010-11-09 12:34:40 +00:00
Alasdair Kergon
de2c6ce36e Regenerate configure with 'autoreconf' for --enable-ocf. (2.02.76) 2010-11-09 11:15:34 +00:00
Alasdair Kergon
af1144cac0 forgotten to regenerate last time configure.in was updated 2010-11-09 11:14:06 +00:00
Alasdair Kergon
4894259eca post-release 2010-11-09 02:58:06 +00:00
Alasdair Kergon
ab3b542a18 pre-release 2010-11-08 19:37:40 +00:00