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

5134 Commits

Author SHA1 Message Date
Alasdair Kergon
10955b8289 Remove tag length restriction and allow / = ! : # & characters. 2010-11-17 10:19:29 +00:00
Peter Rajnoha
adc78505f3 WHATS_NEW FIXME 2010-11-12 16:04:52 +00:00
Alasdair Kergon
f8452d8cfd 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
64dff85ce4 Preserve const for char pointer
Keep char pointers 'const'  (introduced with cling commit).
2010-11-11 12:32:33 +00:00
Zdenek Kabelac
f0fffb8c6f 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
a9d6333bd6 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
1ef6fb2f58 Update fsadm regresion 2010-11-10 10:05:27 +00:00
Zdenek Kabelac
b500eddad1 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
eb82bd0525 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
5a976864ee Regenerate configure with 'autoreconf' for --enable-ocf. (2.02.76) 2010-11-09 11:15:34 +00:00
Alasdair Kergon
37ddf2594a forgotten to regenerate last time configure.in was updated 2010-11-09 11:14:06 +00:00
Alasdair Kergon
ae1a833000 post-release 2010-11-09 02:58:06 +00:00
Alasdair Kergon
962e678174 pre-release 2010-11-08 19:37:40 +00:00
Zdenek Kabelac
e702a9c7ed 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'
2010-11-08 14:19:48 +00:00
Peter Rajnoha
f7e3a19f75 Clarify error messages when activation fails due to activation filter use. 2010-11-05 18:18:11 +00:00
Zdenek Kabelac
e40d44be8d 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.
2010-11-05 16:18:38 +00:00
Zdenek Kabelac
afcae0664e 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.
2010-11-05 16:13:18 +00:00
Zdenek Kabelac
335d694791 Use include make.tmpl
Makes easier to use recursive targets and simplifies Makefile.
2010-11-05 16:10:08 +00:00
Alasdair Kergon
31ed6045f9 lost line 2010-11-02 20:10:35 +00:00
Alasdair Kergon
4b429b6c33 Fix regex optimiser not to ignore RHS of OR nodes in _find_leftmost_common. 2010-11-02 19:56:33 +00:00
Zdenek Kabelac
2955b913ea 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)
2010-11-01 14:17:35 +00:00
Zdenek Kabelac
13047cca5a Add DIAGNOSTICS section to fsadm man page. 2010-11-01 14:10:46 +00:00
Zdenek Kabelac
4886fa2105 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.
2010-11-01 14:08:51 +00:00
Peter Rajnoha
2bea18e504 Use dm_strdup/dm_free instead of strdup/free. 2010-11-01 13:50:51 +00:00
Peter Rajnoha
a83c7816e4 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.
2010-11-01 13:31:55 +00:00
Alasdair Kergon
176bbea069 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.)
2010-10-29 21:15:23 +00:00
Petr Rockai
621a3ac994 Update WHATS_NEW. 2010-10-29 16:44:47 +00:00
Petr Rockai
fe9ac4d3f4 Add code to the dmeventd snapshot plugin to automatically unmount snapshots
that have been invalidated.
2010-10-29 16:43:51 +00:00
Petr Rockai
63b8dfbde7 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.
2010-10-27 11:40:14 +00:00
Petr Rockai
b2959bde18 Add a missed test for dmeventd -R. 2010-10-27 09:16:31 +00:00
Petr Rockai
0396ddf30d Update WHATS_NEW. 2010-10-27 09:15:48 +00:00
Petr Rockai
9b2800e861 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>
2010-10-27 09:13:37 +00:00
Petr Rockai
07d7f642f8 Use a more generous timeout for dmeventd in t-lvconvert-repair-dmeventd. 2010-10-26 12:53:07 +00:00
Petr Rockai
3deeab58c7 Let's rely on the exit code and do not test for empty output. 2010-10-26 12:52:25 +00:00
Zdenek Kabelac
44110cd33e 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.
2010-10-26 10:14:41 +00:00
Zdenek Kabelac
d0604a856d Macro uninitialized_var gives warnings in static analysis
Deactivate uninitialized_var() macro for clang static analysis.
2010-10-26 10:04:34 +00:00
Zdenek Kabelac
2ecd717dc4 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.
2010-10-26 09:57:03 +00:00
Zdenek Kabelac
419d5219cb 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.
2010-10-26 09:13:13 +00:00
Zdenek Kabelac
6426e5d3e6 Instrument compiler about code unreachability
Clang needs some instrumentation help for static code analysis.
It helps gcc and human reader as well.
2010-10-26 09:01:47 +00:00
Zdenek Kabelac
84cc478cc4 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.
2010-10-26 08:59:05 +00:00
Zdenek Kabelac
3a32d104bd Update C declaration () -> (void) 2010-10-26 08:54:37 +00:00
Zdenek Kabelac
962ebfe4b4 Remove bufused for calculation
As bufused is assigned 0 in preceding source line
clang Idempotent operation
2010-10-26 08:53:25 +00:00
Mike Snitzer
178ff2becc 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.
2010-10-26 01:37:59 +00:00
Mike Snitzer
8328e5f094 Explicitly have grep print the matching filenames (needed to
successfully determine scsi_debug device).
2010-10-26 01:25:46 +00:00
Dave Wysochanski
36a4698683 Update WHATS_NEW for lvm2app property functions 2010-10-25 17:33:51 +00:00
Alasdair Kergon
779c11004a post-release 2010-10-25 16:38:20 +00:00
Dave Wysochanski
68c5e7d2df Add interactive tests for lvm_{pv|vg|lv}_get_property(). 2010-10-25 14:09:19 +00:00
Dave Wysochanski
dd68ee88ea 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.
2010-10-25 14:09:08 +00:00
Dave Wysochanski
4e92d7c9ae 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.
2010-10-25 14:08:55 +00:00
Dave Wysochanski
3c1febe0a8 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.
2010-10-25 14:08:43 +00:00