]> sourceware.org Git - lvm2.git/log
lvm2.git
13 years agoAdd the macro and specific 'get' functions for lvsegs.
Petr Rockai [Wed, 17 Nov 2010 20:08:14 +0000 (20:08 +0000)]
Add the macro and specific 'get' functions for lvsegs.

Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
13 years agoAdd a new type and function to lvm2app to enumerate lvsegs.
Petr Rockai [Wed, 17 Nov 2010 20:07:01 +0000 (20:07 +0000)]
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>
13 years agoMake value.string const char *, in properties.h, to fix a warning introduced by
Petr Rockai [Wed, 17 Nov 2010 19:50:15 +0000 (19:50 +0000)]
Make value.string const char *, in properties.h, to fix a warning introduced by
the previous patch set.

13 years agoAdd vg_set_property to the interactive lvm2app test program.
Petr Rockai [Wed, 17 Nov 2010 19:17:07 +0000 (19:17 +0000)]
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>
13 years agoImplement lvm_vg_set_property() by calling internal 'set' property function.
Petr Rockai [Wed, 17 Nov 2010 19:16:05 +0000 (19:16 +0000)]
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>
13 years agoAdd generic infrastructure to internal library to 'set' a property.
Petr Rockai [Wed, 17 Nov 2010 19:15:10 +0000 (19:15 +0000)]
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>
13 years agoRemove tag length restriction and allow / = ! : # & characters.
Alasdair Kergon [Wed, 17 Nov 2010 10:19:29 +0000 (10:19 +0000)]
Remove tag length restriction and allow / = ! : # & characters.

14 years agoWHATS_NEW FIXME
Peter Rajnoha [Fri, 12 Nov 2010 16:04:52 +0000 (16:04 +0000)]
WHATS_NEW FIXME

14 years agoSupport repetition of --addtag and --deltag arguments.
Alasdair Kergon [Thu, 11 Nov 2010 17:29:05 +0000 (17:29 +0000)]
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.

14 years agoPreserve const for char pointer
Zdenek Kabelac [Thu, 11 Nov 2010 12:32:33 +0000 (12:32 +0000)]
Preserve const for char pointer

Keep char pointers 'const'  (introduced with cling commit).

14 years agoAdd date configurable variable DATE
Zdenek Kabelac [Thu, 11 Nov 2010 12:17:15 +0000 (12:17 +0000)]
Add date configurable variable DATE

Follow the rule to run every command through variable dereference.
Add a runtime check of translated date to seconds.

14 years agofsadm fix for downsize of unmounted fs
Zdenek Kabelac [Wed, 10 Nov 2010 16:14:02 +0000 (16:14 +0000)]
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.

14 years agoUpdate fsadm regresion
Zdenek Kabelac [Wed, 10 Nov 2010 10:05:27 +0000 (10:05 +0000)]
Update fsadm regresion

14 years agoScan also 'mount' output for mounted filesystem.
Zdenek Kabelac [Wed, 10 Nov 2010 10:03:07 +0000 (10:03 +0000)]
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.

14 years agoExtend cling allocation policy to recognise PV tags (cling_by_tags).
Alasdair Kergon [Tue, 9 Nov 2010 12:34:40 +0000 (12:34 +0000)]
Extend cling allocation policy to recognise PV tags (cling_by_tags).
Add allocation/cling_tag_list to lvm.conf.

14 years agoRegenerate configure with 'autoreconf' for --enable-ocf. (2.02.76)
Alasdair Kergon [Tue, 9 Nov 2010 11:15:34 +0000 (11:15 +0000)]
Regenerate configure with 'autoreconf' for --enable-ocf. (2.02.76)

14 years agoforgotten to regenerate last time configure.in was updated
Alasdair Kergon [Tue, 9 Nov 2010 11:14:06 +0000 (11:14 +0000)]
forgotten to regenerate last time configure.in was updated

14 years agopost-release
Alasdair Kergon [Tue, 9 Nov 2010 02:58:06 +0000 (02:58 +0000)]
post-release

14 years agopre-release
Alasdair Kergon [Mon, 8 Nov 2010 19:37:40 +0000 (19:37 +0000)]
pre-release

14 years agoFix include commit and switch to use DISTCLEAN_TARGETS
Zdenek Kabelac [Mon, 8 Nov 2010 14:19:48 +0000 (14:19 +0000)]
Fix include commit and switch to use DISTCLEAN_TARGETS

Fixing warning introduced by 'include make.tmpl' commit.
Produced this warning:

Makefile:29: warning: overriding commands for target `distclean'
../make.tmpl:366: warning: ignoring old commands for target `distclean'

14 years agoClarify error messages when activation fails due to activation filter use.
Peter Rajnoha [Fri, 5 Nov 2010 18:18:11 +0000 (18:18 +0000)]
Clarify error messages when activation fails due to activation filter use.

14 years agoAdd OCF support
Zdenek Kabelac [Fri, 5 Nov 2010 16:18:38 +0000 (16:18 +0000)]
Add OCF support

Updated patch from Florian Haas from Linux-HA project.

User needs to 'configure --enable-ocf' to get file installed
by 'make install' target by default.
User can also use 'make install_ocf' to get only ocf files installed.
With disabled (default) ocf support - no ocf files are installed.

FIXME: ocf installation path needs to be kept in sync with pacemaker.
find better way and possible also better location.

14 years agoAdd given user prefix to make target install_initscripts
Zdenek Kabelac [Fri, 5 Nov 2010 16:13:18 +0000 (16:13 +0000)]
Add given user prefix to make target install_initscripts

Avoid files to be written into the live system if lvm was
configured with different --prefix.

Use initdir for install target path.

14 years agoUse include make.tmpl
Zdenek Kabelac [Fri, 5 Nov 2010 16:10:08 +0000 (16:10 +0000)]
Use include make.tmpl

Makes easier to use recursive targets and simplifies Makefile.

14 years agolost line
Alasdair Kergon [Tue, 2 Nov 2010 20:10:35 +0000 (20:10 +0000)]
lost line

14 years agoFix regex optimiser not to ignore RHS of OR nodes in _find_leftmost_common.
Alasdair Kergon [Tue, 2 Nov 2010 19:56:33 +0000 (19:56 +0000)]
Fix regex optimiser not to ignore RHS of OR nodes in _find_leftmost_common.

14 years agoUse new status code from fsadm check
Zdenek Kabelac [Mon, 1 Nov 2010 14:17:35 +0000 (14:17 +0000)]
Use new status code from fsadm check

Patch updates exec_cmd() and adds 3rd parameter with pointer for
status value, so caller might examine returned status code.
If the passed pointer is NULL, behavior is unmodified.

Patch allows to confinue with lvresize if the failure from fsadm check is
caused by mounted filesystem as many of filesystem resize tools do support
online filesystem resize. (originally user had to use flag '-n' to bypass
this filesystem check)

14 years agoAdd DIAGNOSTICS section to fsadm man page.
Zdenek Kabelac [Mon, 1 Nov 2010 14:10:46 +0000 (14:10 +0000)]
Add DIAGNOSTICS section to fsadm man page.

14 years agoReturn different status code for fsadm check of mounted filesystem
Zdenek Kabelac [Mon, 1 Nov 2010 14:08:51 +0000 (14:08 +0000)]
Return different status code for fsadm check of mounted filesystem

Return status code 3 for fsadm check of mounted filesystem - used later with
lvresize update patch to better support online filesystem resize.

Also makes a more consistent user interruption and returns status code 2
in this case.

14 years agoUse dm_strdup/dm_free instead of strdup/free.
Peter Rajnoha [Mon, 1 Nov 2010 13:50:51 +0000 (13:50 +0000)]
Use dm_strdup/dm_free instead of strdup/free.

14 years agoAllocate buffer for reporting functions dynamically to support long outputs.
Peter Rajnoha [Mon, 1 Nov 2010 13:31:55 +0000 (13:31 +0000)]
Allocate buffer for reporting functions dynamically to support long outputs.
Fix memory leak of field_id in _output_field function.

There's been a patch added recently to use dynamic allocation for metadata
tags buffer to remove the 4k limit (for writing metadata out). However, when
using reporting commands like vgs and lvs, we still need to fix libdm reporting
functions themselves to support such long outputs. So the buffer used in those
reporting functions is dynamic now.

The patch also includes a fix for field_id memory leak which was found in
the _output_field function.

14 years agoUpdate VG metadata only once in vgchange when making multiple changes.
Alasdair Kergon [Fri, 29 Oct 2010 21:15:23 +0000 (21:15 +0000)]
Update VG metadata only once in vgchange when making multiple changes.
Allow independent vgchange arguments to be used together.
(Still more inconsistencies to iron out here.)

14 years agoUpdate WHATS_NEW.
Petr Rockai [Fri, 29 Oct 2010 16:44:47 +0000 (16:44 +0000)]
Update WHATS_NEW.

14 years agoAdd code to the dmeventd snapshot plugin to automatically unmount snapshots
Petr Rockai [Fri, 29 Oct 2010 16:43:51 +0000 (16:43 +0000)]
Add code to the dmeventd snapshot plugin to automatically unmount snapshots
that have been invalidated.

14 years agoAlasdair correctly pointed out that if the two closes are concurrent (I haven't
Petr Rockai [Wed, 27 Oct 2010 11:40:14 +0000 (11:40 +0000)]
Alasdair correctly pointed out that if the two closes are concurrent (I haven't
checked, so they *might*), there is still a race possibility with the last
fix. This patch fixes that.

14 years agoAdd a missed test for dmeventd -R.
Petr Rockai [Wed, 27 Oct 2010 09:16:31 +0000 (09:16 +0000)]
Add a missed test for dmeventd -R.

14 years agoUpdate WHATS_NEW.
Petr Rockai [Wed, 27 Oct 2010 09:15:48 +0000 (09:15 +0000)]
Update WHATS_NEW.

14 years agoFix a double close in clvmd.
Petr Rockai [Wed, 27 Oct 2010 09:13:37 +0000 (09:13 +0000)]
Fix a double close in clvmd.

The management threads (main_loop, the socket thread) could close a single fd
twice in a row sometimes. At least one other thread can be running at the same
time as the threads doing the double close. That one running thread also
happens to do some IO (namely, open /proc/devices, read from it, close it). If
there was enough "demand" for the local socket, this could happen:

- a connection to clvmd is about to finish, let's say the fd is 13 (it often
  happens to be in my test script, don't ask why)
- the local_sock thread calls close(13)
- the lvm thread calls open("/proc/devices"...) and gets 13
- the main_loop thread calls close(13) [OOPS!]
- new connection arrives, and is accept'd by a (new) local_sock thread
- the accept gives an fd of 13 (since it's the lowest free fd at this point)
- the lvm thread gets around to read from it's /proc/devices handle... 13,
  again
- the lvm thread hangs forever trying to read from the socket instead of
  /proc/devices

Signed-off-by: Petr Rockai <prockai@redhat.com>
Reviewed-by: Milan Broz <mbroz@redhat.com>
14 years agoUse a more generous timeout for dmeventd in t-lvconvert-repair-dmeventd.
Petr Rockai [Tue, 26 Oct 2010 12:53:07 +0000 (12:53 +0000)]
Use a more generous timeout for dmeventd in t-lvconvert-repair-dmeventd.

14 years agoLet's rely on the exit code and do not test for empty output.
Petr Rockai [Tue, 26 Oct 2010 12:52:25 +0000 (12:52 +0000)]
Let's rely on the exit code and do not test for empty output.

14 years agoAdd missing return for NULL passed buffer
Zdenek Kabelac [Tue, 26 Oct 2010 10:14:41 +0000 (10:14 +0000)]
Add missing return for NULL passed buffer

Function pull_stateo() checks for NULL 'buf' - but return for this error
path was missing.  cmirror code never calls this function with NULL 'buf',
so this fix has no effect on current code base, but makes clang happier.

14 years agoMacro uninitialized_var gives warnings in static analysis
Zdenek Kabelac [Tue, 26 Oct 2010 10:04:34 +0000 (10:04 +0000)]
Macro uninitialized_var gives warnings in static analysis

Deactivate uninitialized_var() macro for clang static analysis.

14 years agoHotfix usage of __builtin_unreachable()
Zdenek Kabelac [Tue, 26 Oct 2010 09:57:03 +0000 (09:57 +0000)]
Hotfix usage of __builtin_unreachable()

It's quite new feature which is not supported by older compilers.
So until some better macros are introduced into LVM code - hotfix current
compilation problems and compile this code only for __clang__ defining compilers.

14 years agoFix NULL pointer dereference for too large MDA error path
Zdenek Kabelac [Tue, 26 Oct 2010 09:13:13 +0000 (09:13 +0000)]
Fix NULL pointer dereference for too large MDA error path

Replace dereference of NULL vg with passed vgname to the function
_vg_read_raw_area() in the error path for too large MDA.

14 years agoInstrument compiler about code unreachability
Zdenek Kabelac [Tue, 26 Oct 2010 09:01:47 +0000 (09:01 +0000)]
Instrument compiler about code unreachability

Clang needs some instrumentation help for static code analysis.
It helps gcc and human reader as well.

14 years agoUse static indentifier for internal functions
Zdenek Kabelac [Tue, 26 Oct 2010 08:59:05 +0000 (08:59 +0000)]
Use static indentifier for internal functions

Functions _align_chunk() and  _new_chunk() are used only internally inside
pool-fast.c - so keep them static inside this object file.

14 years agoUpdate C declaration () -> (void)
Zdenek Kabelac [Tue, 26 Oct 2010 08:54:37 +0000 (08:54 +0000)]
Update C declaration  () -> (void)

14 years agoRemove bufused for calculation
Zdenek Kabelac [Tue, 26 Oct 2010 08:53:25 +0000 (08:53 +0000)]
Remove bufused for calculation

As bufused is assigned 0 in preceding source line
clang Idempotent operation

14 years agoFix vgchange to process -a, --refresh, --monitor and --poll like lvchange.
Mike Snitzer [Tue, 26 Oct 2010 01:37:59 +0000 (01:37 +0000)]
Fix vgchange to process -a, --refresh, --monitor and --poll like lvchange.

Simultaneous -a and --refresh is not valid.
poll+monitor are valid together with or without -ay* (but not with -an*)

No longer print polling results summary if no LVs in the VG were polled.

14 years agoExplicitly have grep print the matching filenames (needed to
Mike Snitzer [Tue, 26 Oct 2010 01:25:46 +0000 (01:25 +0000)]
Explicitly have grep print the matching filenames (needed to
successfully determine scsi_debug device).

14 years agoUpdate WHATS_NEW for lvm2app property functions
Dave Wysochanski [Mon, 25 Oct 2010 17:33:51 +0000 (17:33 +0000)]
Update WHATS_NEW for lvm2app property functions

14 years agopost-release
Alasdair Kergon [Mon, 25 Oct 2010 16:38:20 +0000 (16:38 +0000)]
post-release

14 years agoAdd interactive tests for lvm_{pv|vg|lv}_get_property().
Dave Wysochanski [Mon, 25 Oct 2010 14:09:19 +0000 (14:09 +0000)]
Add interactive tests for lvm_{pv|vg|lv}_get_property().

14 years agoAdd lvm_lv_get_property() generic function to obtain value of any lv propert
Dave Wysochanski [Mon, 25 Oct 2010 14:09:08 +0000 (14:09 +0000)]
Add lvm_lv_get_property() generic function to obtain value of any lv propert

Add a generic LV property function to lvm2app, similar to VG function.
Return lvm_property_value and require caller to check 'is_valid' flag
and lvm_errno() for API error.

14 years agoAdd lvm_pv_get_property() generic function to obtain value of any pv property.
Dave Wysochanski [Mon, 25 Oct 2010 14:08:55 +0000 (14:08 +0000)]
Add lvm_pv_get_property() generic function to obtain value of any pv property.

Add a generic PV property function to lvm2app, similar to VG function.
Return lvm_property_value and require caller to check 'is_valid' flag
before using the value.  If 'is_valid' is not set, then lvm_errno()
should be used to obtain the specific error.

14 years agoAdd lvm_vg_get_property() generic vg property function.
Dave Wysochanski [Mon, 25 Oct 2010 14:08:43 +0000 (14:08 +0000)]
Add lvm_vg_get_property() generic vg property function.

Add a generic VG property function to lvm2app.  Call the internal library
vg_get_property() function.  Strings are dup'd internally.
Rework lvm_vg_get_property to return lvm_property_value and require caller
to check 'is_valid' flag.  If !is_valid, the caller can check lvm_errno()
for the specific error.

Create a 'get_property' function, local to lvm2app, that factors out
most of the common code that copies the components of lvm_property_type
into lvm_property_value.  This allows for a 1-line function for each
of the generic property functions exported by lvm2app.

14 years agoAdd 'is_integer' flag into internal lvm_property_type.
Dave Wysochanski [Mon, 25 Oct 2010 14:08:32 +0000 (14:08 +0000)]
Add 'is_integer' flag into internal lvm_property_type.

Add 'is_integer' flag similar to 'is_string'.
Suggested in review by Petr Rockai.

14 years agopre-release
Alasdair Kergon [Mon, 25 Oct 2010 13:54:29 +0000 (13:54 +0000)]
pre-release

14 years agoUse const config node
Zdenek Kabelac [Mon, 25 Oct 2010 13:38:11 +0000 (13:38 +0000)]
Use const config node

14 years agoFix constness warning
Zdenek Kabelac [Mon, 25 Oct 2010 13:36:57 +0000 (13:36 +0000)]
Fix constness warning

Fix usage of const 'data' pointer and also assign void* directly without
uneeded cast for C.

14 years agoFix constness warning
Zdenek Kabelac [Mon, 25 Oct 2010 13:36:09 +0000 (13:36 +0000)]
Fix constness warning

Keep using const pointers.

14 years agoFix constness warning for _vg_read_by_vgid() uuid usage
Zdenek Kabelac [Mon, 25 Oct 2010 13:35:13 +0000 (13:35 +0000)]
Fix constness warning for _vg_read_by_vgid() uuid usage

14 years agoFix constness warnings
Zdenek Kabelac [Mon, 25 Oct 2010 13:33:42 +0000 (13:33 +0000)]
Fix constness warnings

After update of device_from_pvid() API fix constness warnings
Also fix info_from_pvid() constness warning for char* usage.

14 years agoUse const pointer for return value of dm_basename
Zdenek Kabelac [Mon, 25 Oct 2010 13:13:53 +0000 (13:13 +0000)]
Use const pointer for return value of dm_basename

Fix return pointer to const as it is created from passed input const pointer.

14 years agook this seems to be never ending story...
Zdenek Kabelac [Mon, 25 Oct 2010 13:10:13 +0000 (13:10 +0000)]
ok this seems to be never ending story...

14 years agorom -> from
Zdenek Kabelac [Mon, 25 Oct 2010 13:04:23 +0000 (13:04 +0000)]
rom -> from

14 years agoUse 'const' struct id *pvid for device_from_pvid()
Zdenek Kabelac [Mon, 25 Oct 2010 13:02:26 +0000 (13:02 +0000)]
Use 'const' struct id *pvid for device_from_pvid()

Update interface for device_from_pvid and use const pointer.

14 years agoSwitch to char* arithmetic from void*
Zdenek Kabelac [Mon, 25 Oct 2010 13:00:35 +0000 (13:00 +0000)]
Switch to char* arithmetic from void*

14 years agoFix missing initilisation to 0
Zdenek Kabelac [Mon, 25 Oct 2010 12:59:24 +0000 (12:59 +0000)]
Fix missing initilisation to 0

Add missing init value for variable 'found' which is later tested and may
have contained some garbage value.

14 years agoFix potential NULL pointer dereference
Zdenek Kabelac [Mon, 25 Oct 2010 12:57:00 +0000 (12:57 +0000)]
Fix potential NULL pointer dereference

Makes clang happier as it covers all code paths and avoids NULL pointer
dereference through the 'com' pointer (which is NULL by default static
initialisation).

14 years agoReuse result of previous strchr
Zdenek Kabelac [Mon, 25 Oct 2010 12:08:15 +0000 (12:08 +0000)]
Reuse result of previous strchr

Reported by clang as: Argument with 'nonnull' attribute passed null

Reuse the result of the last strchr() call - make sure, 'st' point is not
null for the next strchr() call.

14 years agoEnsure we always have origin defined
Zdenek Kabelac [Mon, 25 Oct 2010 12:05:46 +0000 (12:05 +0000)]
Ensure we always have origin defined

Reported by clang as: Logic error Dereference of null pointer
Make sure the code path could not use NULL origin because of some internal
code error.

14 years agofix header #defines
Alasdair Kergon [Mon, 25 Oct 2010 12:01:59 +0000 (12:01 +0000)]
fix header #defines

14 years agoPrint vg_name and do not to access vg->name
Zdenek Kabelac [Mon, 25 Oct 2010 12:01:38 +0000 (12:01 +0000)]
Print vg_name and do not to access vg->name

Reported by clang as: Logic error Dereference of null pointer
Replace pointer dereference with vg_name.

14 years agoFix clang warning for ntohl(*((uint32_t *)buf))
Zdenek Kabelac [Mon, 25 Oct 2010 11:57:06 +0000 (11:57 +0000)]
Fix clang warning for ntohl(*((uint32_t *)buf))

We cast (char*) to (uint32_t*) that changes alignment requierements.
For our case the code has been correct as alloca() returns properly
aligned buffer, however this patch make it cleaner and more readable
and avoids warning generation.

14 years agoUse a more-generic name for the new kernel flag so list_devices can share it.
Alasdair Kergon [Mon, 25 Oct 2010 11:44:20 +0000 (11:44 +0000)]
Use a more-generic name for the new kernel flag so list_devices can share it.

14 years agoAdd global/metadata_read_only to use unrepaired metadata in read-only cmds.
Alasdair Kergon [Mon, 25 Oct 2010 11:20:54 +0000 (11:20 +0000)]
Add global/metadata_read_only to use unrepaired metadata in read-only cmds.

14 years agoDon't take write lock in vgchange --refresh, --poll or --monitor.
Alasdair Kergon [Mon, 25 Oct 2010 10:40:13 +0000 (10:40 +0000)]
Don't take write lock in vgchange --refresh, --poll or --monitor.

14 years agorestrict last checkin to devs consisting entirely of error target
Alasdair Kergon [Mon, 25 Oct 2010 10:37:34 +0000 (10:37 +0000)]
restrict last checkin to devs consisting entirely of error target

14 years agoNever scan a device which is using the error target
Mike Snitzer [Sun, 24 Oct 2010 17:36:58 +0000 (17:36 +0000)]
Never scan a device which is using the error target

A merged snapshot's DM device is made to use the "error" target as part
of lvm's transaction to merge a snapshot.  This snapshot merge use-case
aside, any device using the error target shouldn't be scanned.

14 years agoAdd lv_get_property() internal lvm function.
Dave Wysochanski [Thu, 21 Oct 2010 18:51:16 +0000 (18:51 +0000)]
Add lv_get_property() internal lvm function.

14 years agoRename fields in lvm_property_type.
Dave Wysochanski [Thu, 21 Oct 2010 14:49:43 +0000 (14:49 +0000)]
Rename fields in lvm_property_type.

Based on review comments, rename a few fields in lvm_property_type.
In particular, change 'is_writeable' to 'is_settable', which is
more intuitive to the intent of the bitfield (a 'set' function
exists for this field/property).  Also, remove the char array
for 'id' - unnecessary as we can just use the string passed in
to do the strcmp.  Finally rename the union members from n_val
to 'integer' and 's_val' to 'string'.

14 years agoAdd lv_read_ahead and lv_kernel_read_ahead 'get' functions.
Dave Wysochanski [Thu, 21 Oct 2010 14:49:31 +0000 (14:49 +0000)]
Add lv_read_ahead and lv_kernel_read_ahead 'get' functions.

14 years agoRefactor and add code for (lv) 'lv_origin' get function.
Dave Wysochanski [Thu, 21 Oct 2010 14:49:20 +0000 (14:49 +0000)]
Refactor and add code for (lv) 'lv_origin' get function.

14 years agoRefactor and add code for (lv) 'lv_name' get function.
Dave Wysochanski [Thu, 21 Oct 2010 14:49:10 +0000 (14:49 +0000)]
Refactor and add code for (lv) 'lv_name' get function.

14 years agoReduce a (huge) timeout in t-mirror-names.
Petr Rockai [Wed, 20 Oct 2010 15:35:00 +0000 (15:35 +0000)]
Reduce a (huge) timeout in t-mirror-names.

14 years agoAdd a test for BZ 509182 (vgchange --monitor y breaks with max_lv).
Petr Rockai [Wed, 20 Oct 2010 15:32:15 +0000 (15:32 +0000)]
Add a test for BZ 509182 (vgchange --monitor y breaks with max_lv).

14 years agoAdd coverage test for partition table scanning
Zdenek Kabelac [Wed, 20 Oct 2010 15:14:13 +0000 (15:14 +0000)]
Add coverage test for partition table scanning

14 years agoImplement dmeventd -R, allowing dmeventd to be restarted without losing
Petr Rockai [Wed, 20 Oct 2010 15:12:12 +0000 (15:12 +0000)]
Implement dmeventd -R, allowing dmeventd to be restarted without losing
monitoring state.

14 years agoFix strict-aliasing compile warning in partition table scanning
Zdenek Kabelac [Wed, 20 Oct 2010 15:07:30 +0000 (15:07 +0000)]
Fix strict-aliasing compile warning in partition table scanning

14 years agoRevert some debug statements that slipped in with last checkin.
Petr Rockai [Wed, 20 Oct 2010 14:51:18 +0000 (14:51 +0000)]
Revert some debug statements that slipped in with last checkin.

14 years agoFix a deadlock in clvmd.
Petr Rockai [Wed, 20 Oct 2010 14:46:45 +0000 (14:46 +0000)]
Fix a deadlock in clvmd.

The signalling code (pthread_cond_signal/pthread_cond_wait) in the
pre_and_post_thread was using the wait mutex (see man pthread_cond_wait)
incorrectly, and this could cause clvmd to deadlock when timing was
right. Detailed explanation of the problem follows.

There is a single mutex around (L for Lock, U for Unlock), a signal (S) and a
wait (W). C for pthread_create. Time flows from left to right, each arrow is a
thread.

So first the "naive" scenario, with no mutex (PPT = pre_and_post_thread, MCT =
main clvmd thread; well actually the thread that does read_from_local_sock). I
will also use X, for a moment when MCT actually waits for something to happen
that PPT was supposed to do.

MCT -----C ------S--X-----S----X----------------------S------XXXXXXXXX
         |                everything OK up to this --> <-- point...
PPT       -----WWW-----WWWW------------------------------WWWWWWWWWWWWW

Ok, so pthread API actually does not let you use W/S like that. It goes out of
its way to tell you that you need a mutex to protect the W so that the above
cannot happen. *But* if you are creative and just lock around the W's and S's,
this happens:

MCT ----C-----LSU----X-----LSU----X------------LSU------XXXXXXX
        |
PPT      ---LWWWU-------LWWWWU-----------------------LWWWWWWWWW

Ooops. Nothing changed (the above is what actually was done by clvmd before
this satch). So let's do it differently, holding L locked *all* the time in
PPT, unless we are actually in W (this is something that the pthread API does
itself, see the man page).

MCT ----C-----LSU------X---LSU---X-----LLLLLLLSU----X----
        |                             (and they live happily ever after)
PPT     L---WWWWW---------WWWW----------------W----------

So W actually ensures that L is unlocked *atomically* together with entering
the wait. That means that unless PPT is actually waiting, it cannot be
signalled by MCT. So if MCT happens to signal it too soon (it wasn't waiting
yet), it (MCT) will be blocked on the mutex (L), until PPT is actually ready to
do something.

14 years agoAvoid an extraneous orphans unlock in vgextend --restoremissing.
Petr Rockai [Mon, 18 Oct 2010 17:27:10 +0000 (17:27 +0000)]
Avoid an extraneous orphans unlock in vgextend --restoremissing.

14 years agoUpdate WHATS_NEW.
Petr Rockai [Fri, 15 Oct 2010 17:04:02 +0000 (17:04 +0000)]
Update WHATS_NEW.

14 years agoImplement automatic snapshot extension with dmeventd, and add two new options
Petr Rockai [Fri, 15 Oct 2010 16:28:14 +0000 (16:28 +0000)]
Implement automatic snapshot extension with dmeventd, and add two new options
to lvm.conf in the activation section: 'snapshot_autoextend_threshold' and
'snapshot_autoextend_percent', that define how to handle automatic snapshot
extension. The former defines when the snapshot should be extended: when its
space usage exceeds this many percent. The latter defines how much extra space
should be allocated for the snapshot, in percent of its current size.

14 years agoFixes for the devices/disable_after_error_count documentation.
Petr Rockai [Fri, 15 Oct 2010 16:24:00 +0000 (16:24 +0000)]
Fixes for the devices/disable_after_error_count documentation.

14 years agoUpdate
Zdenek Kabelac [Fri, 15 Oct 2010 09:55:37 +0000 (09:55 +0000)]
Update

14 years agoSpeedup memory un/locking
Zdenek Kabelac [Fri, 15 Oct 2010 09:48:23 +0000 (09:48 +0000)]
Speedup memory un/locking

Move the call of find_config_tree_node() from inner loop to outer
section of maps scanning.

14 years agoFix linking order for liblvm2cmd
Zdenek Kabelac [Fri, 15 Oct 2010 09:41:21 +0000 (09:41 +0000)]
Fix linking order for liblvm2cmd

Reorder linked libraries so we better support --as-needed linker flag used
by some distributions (i.e. Gentoo).

Patch suggested by Diego Elio Pettenò <flameeyes <at> gmail.com>

14 years agoAdd --setuuid to dmsetup rename.
Alasdair Kergon [Fri, 15 Oct 2010 01:10:27 +0000 (01:10 +0000)]
Add --setuuid to dmsetup rename.
Add dm_task_set_newuuid to set uuid of mapped device post-creation. (pjones)

This page took 0.064917 seconds and 5 git commands to generate.