]> sourceware.org Git - lvm2.git/log
lvm2.git
14 years agoFix lcov target
Zdenek Kabelac [Tue, 6 Apr 2010 09:50:07 +0000 (09:50 +0000)]
Fix lcov target

Patch fixes generation of coverage files for dmeventd and adds support for clvmd.
Path names are stripped, so the the html looks better.
Frames 'previews' is enabled for generated pages.
Using top_srcdir was wrong here - though we still can't easily use builddir.
Requiers using shell variables before execution of binaries build outside
of srcdir.

14 years agoremove compiler warning
Alasdair Kergon [Fri, 2 Apr 2010 01:35:34 +0000 (01:35 +0000)]
remove compiler warning

14 years agoA few more log_error to log_warn changes for mirrors.
Alasdair Kergon [Thu, 1 Apr 2010 14:54:37 +0000 (14:54 +0000)]
A few more log_error to log_warn changes for mirrors.

14 years agoBetter debug message for Un/Locked memory size.
Zdenek Kabelac [Thu, 1 Apr 2010 14:53:47 +0000 (14:53 +0000)]
Better debug message for Un/Locked memory size.

14 years agotemporarily downgrade the 'open while suspended' error till we fix it properly
Alasdair Kergon [Thu, 1 Apr 2010 14:30:51 +0000 (14:30 +0000)]
temporarily downgrade the 'open while suspended' error till we fix it properly

14 years agoTry to fix tracking of whether or not log extents need allocating.
Alasdair Kergon [Thu, 1 Apr 2010 13:58:13 +0000 (13:58 +0000)]
Try to fix tracking of whether or not log extents need allocating.

14 years agoSet ret value to success initially.
Zdenek Kabelac [Thu, 1 Apr 2010 13:43:12 +0000 (13:43 +0000)]
Set ret value to success initially.

14 years agoAvoid endless loop if lv->segments list is corrupted
Alasdair Kergon [Thu, 1 Apr 2010 13:08:06 +0000 (13:08 +0000)]
Avoid endless loop if lv->segments list is corrupted

14 years agoinitialise log_allocated to 0
Alasdair Kergon [Thu, 1 Apr 2010 12:29:07 +0000 (12:29 +0000)]
initialise log_allocated to 0

14 years agoLimit number of error messages when checking LV segments.
Alasdair Kergon [Thu, 1 Apr 2010 12:14:20 +0000 (12:14 +0000)]
Limit number of error messages when checking LV segments.

14 years agoImprove vg_validate to detect some loops in lists.
Alasdair Kergon [Thu, 1 Apr 2010 11:45:36 +0000 (11:45 +0000)]
Improve vg_validate to detect some loops in lists.

14 years agoImprove vg_validate to detect some loops in lists.
Alasdair Kergon [Thu, 1 Apr 2010 11:43:24 +0000 (11:43 +0000)]
Improve vg_validate to detect some loops in lists.

14 years agoChange most remaining log_error WARNING messages to log_warn.
Alasdair Kergon [Thu, 1 Apr 2010 10:34:09 +0000 (10:34 +0000)]
Change most remaining log_error WARNING messages to log_warn.

14 years agoDo not pass NULL to setenv in the test harness.
Petr Rockai [Wed, 31 Mar 2010 23:11:12 +0000 (23:11 +0000)]
Do not pass NULL to setenv in the test harness.

14 years agoMissed to convert T -> SCRIPTS
Zdenek Kabelac [Wed, 31 Mar 2010 23:05:20 +0000 (23:05 +0000)]
Missed to convert T -> SCRIPTS

14 years agoRe-run failing tests with log/verbose=4 (-vvvv) to help with debugging.
Petr Rockai [Wed, 31 Mar 2010 22:18:17 +0000 (22:18 +0000)]
Re-run failing tests with log/verbose=4 (-vvvv) to help with debugging.

14 years agoremove unused var
Alasdair Kergon [Wed, 31 Mar 2010 20:39:51 +0000 (20:39 +0000)]
remove unused var

14 years agoAttempt to fix non-ALLOC_ANYWHERE allocation code after recent changes broke
Alasdair Kergon [Wed, 31 Mar 2010 20:26:04 +0000 (20:26 +0000)]
Attempt to fix non-ALLOC_ANYWHERE allocation code after recent changes broke
The preference given to the PVs with the largest free areas.

14 years agoAlways use blocking lock for VGs and orphan locks.
Milan Broz [Wed, 31 Mar 2010 17:23:56 +0000 (17:23 +0000)]
Always use blocking lock for VGs and orphan locks.

Because we have now strong rule for lock ordering:
 - VG locks must be taken in alphabetical order
 - ORPHAN locks must be the last
vgs_locked() is now not needed.

This fixes problem with orphan locking, e.g.
vgremove VG1    |    vgremove VG2
lock(VG1)       |    lock(VG2)
lock(ORPHAN)    |    lock(ORPHAN) -> fail, non-blocking

https://bugzilla.redhat.com/show_bug.cgi?id=578413

(More similar places in code.)

14 years agoFix all segments memory is allocated from vg private mempool.
Milan Broz [Wed, 31 Mar 2010 17:23:18 +0000 (17:23 +0000)]
Fix all segments memory is allocated from vg private mempool.

Physical segments were still allocated from global
command context mempool.

This leads to very high memory usage when
activating large VG (vgchange).
(Memory usage was about 2G when >3000LVs).

Fix it by properly using vg->vgmem private pool,
so all the memory is released early.

New memory pool parameter is needed here for pv_split_segment
function.

Also fix the same problem in some minor allocations
(vg description, lv segment split).

14 years agoDo not traverse PV segment list twice.
Milan Broz [Wed, 31 Mar 2010 17:22:26 +0000 (17:22 +0000)]
Do not traverse PV segment list twice.

In addition to previous patch, we really do not need
to search for segment which was just allocated in
split request.

Make pv_split_segment function return newly allocated
(split) segment also.

(So after this patch, there is only one user
of slow find_peg_by_pe).

14 years agoOptimise PV segments search.
Milan Broz [Wed, 31 Mar 2010 17:21:40 +0000 (17:21 +0000)]
Optimise PV segments search.

The function find_peg_by_pe is incredibly inefficient
for Pvs with many segments.

In shiny future there should be binary (or interval) tree
instead of sorted linked list (volunteers?).

Anyway, for now, we can use dirty trick here to optimise this case:

 - Allocations are usually applied from the beginning
 of PV (we have no alloocation policy which allocates areas
 "backwards")

 - The only user of find_peg_by_pe is pv_split_segment()
 call. In *most* cases it need to split *last* PV segment.

So if we search sorted pv segment list backwards, we
hit the requested segment immediatelly.

This patch applies this tiny change.
(and saves >30% of processing time when >3000LVs segments are on one PV!)

To discourage using this inefficient function from other code,
it is moved to pv_manip.c and used static for now:-)

14 years agoRemove vg_validate call when parsing cached metadata.
Milan Broz [Wed, 31 Mar 2010 17:20:44 +0000 (17:20 +0000)]
Remove vg_validate call when parsing cached metadata.

vg_validate call is an adept to optimisation, it is very
ineeficient and slow.

Anyway, we should call it only before writing data to disk.

The call in lvmcache was just temporary validation,
we realy do not need to revalidate cached metadata
every time.
(Actually, I added that there just to prove that cache works
properly and forgot to remove it.)

Patch removes it from lvmcache completely, this can hit only
internal bug in export function (and this bug must
be detected in any vg_write call anyway before).

14 years agoUse hash table for quick lv reference when reading metadata.
Milan Broz [Wed, 31 Mar 2010 17:20:02 +0000 (17:20 +0000)]
Use hash table for quick lv reference when reading metadata.

The _read_vg uses already hash for PVs to optimise
reading of large VGs and avoiding repeated PV list traversing.

Use the same aproach to speed up parsing VG with many LVs.

14 years agoA missing space in the error message.
Mikulas Patocka [Wed, 31 Mar 2010 12:06:30 +0000 (12:06 +0000)]
A missing space in the error message.
Add missing parentheses to an error message

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
14 years agoDon't kill the parent if debugging.
Mikulas Patocka [Wed, 31 Mar 2010 12:01:49 +0000 (12:01 +0000)]
Don't kill the parent if debugging.

If dmeventd runs with -d flag, it doesn't fork into backgroud.
The command kill(getppid(), SIGTERM) attempts to kill the parent dmeventd
process, however, if there is no parent, it kills whatever process spawned
dmeventd. In case of debugging with gdb, the parent is gdb, thus
kill(getppid(), SIGTERM) kills the debugger.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
14 years agoUpdate for make install.
Zdenek Kabelac [Wed, 31 Mar 2010 07:43:41 +0000 (07:43 +0000)]
Update for make install.

14 years agoInstall generated 10-dm.rules from builddir.
Zdenek Kabelac [Wed, 31 Mar 2010 07:40:20 +0000 (07:40 +0000)]
Install generated 10-dm.rules from builddir.

Patch just check whether file is generated in builddir otherwise srcdir file
is used.

14 years agoUse .commands created in builddir for symlink installation.
Zdenek Kabelac [Wed, 31 Mar 2010 07:37:16 +0000 (07:37 +0000)]
Use .commands created in builddir for symlink installation.

14 years agoWe only need one extent for the mirror log. So, when specifying
Jonathan Earl Brassow [Wed, 31 Mar 2010 03:56:25 +0000 (03:56 +0000)]
We only need one extent for the mirror log.  So, when specifying
the devices on which to place the individual mirror parts, we can
specify the log devices as $dev:x instead of $dev:x-y.

14 years agoFor the mirror repair tests, we should use --ignoremonitoring because
Jonathan Earl Brassow [Wed, 31 Mar 2010 02:36:03 +0000 (02:36 +0000)]
For the mirror repair tests, we should use --ignoremonitoring because
we are running the repair manually.  If we don't ignore, then dmeventd
and the manually run repair can collide.  (We should still get clean
results in such a case, but it makes it harder to validate the test
results.)

14 years agoUpdate for dmeventd changes.
Zdenek Kabelac [Tue, 30 Mar 2010 14:44:57 +0000 (14:44 +0000)]
Update for dmeventd changes.

14 years agoCount only readable size for memlock stats.
Zdenek Kabelac [Tue, 30 Mar 2010 14:41:58 +0000 (14:41 +0000)]
Count only readable size for memlock stats.

As we mlock() only readable pages, makes statistics only
for readable bytes.

14 years agoUpdate memlock
Zdenek Kabelac [Tue, 30 Mar 2010 14:41:23 +0000 (14:41 +0000)]
Update memlock

Code moves initilization of stats values to _memlock_maps().
For dmeventd we need to use mlockall() - so avoid reading config value
and go with _use_mlockall code path.

Patch assumes dmeventd uses C locales!
Patch needs the call or memlock_inc_daemon() before memlock_inc()
(which is our common use case).

Some minor code cleanup patch for _un/_lock_mem_if_needed().

14 years agoForce C locale
Zdenek Kabelac [Tue, 30 Mar 2010 14:40:30 +0000 (14:40 +0000)]
Force C locale

As we need to use mlockall() enforce "C" locales for dmeventd.

14 years agoUpdated syslog messages
Zdenek Kabelac [Tue, 30 Mar 2010 14:39:55 +0000 (14:39 +0000)]
Updated syslog messages

Use our common '.' end format for syslog messages.

14 years agoRelease pool in the same reversed order
Zdenek Kabelac [Tue, 30 Mar 2010 14:38:56 +0000 (14:38 +0000)]
Release pool in the same reversed order
and with lowered priority after _memlock_dec.

14 years agoFix resouce leak in error path
Zdenek Kabelac [Tue, 30 Mar 2010 14:37:28 +0000 (14:37 +0000)]
Fix resouce leak in error path

If the error path of _register_for_event() calls _free_thread_status()
_lib_put() call is missing.
To make thing simpler move this _lib_put() into common error path code.

14 years agoRemove mlockall() form dmeventd
Zdenek Kabelac [Tue, 30 Mar 2010 14:35:40 +0000 (14:35 +0000)]
Remove mlockall() form dmeventd

As the header file <sys/mman.h> was not included in dmeventd.c
thus missed definition of MCL_CURRENT so this patch only makes
it obvious we were not locking memory here.

This patch has no functional change.
Later part of this patch set handles mlockall() via memlock_inc_daemon().

14 years agoFix --alloc contiguous policy only to allocate one set of parallel areas.
Alasdair Kergon [Mon, 29 Mar 2010 17:59:46 +0000 (17:59 +0000)]
Fix --alloc contiguous policy only to allocate one set of parallel areas.

14 years agoWork around a problem in t-mirror-lvconvert: different PV order on the
Petr Rockai [Mon, 29 Mar 2010 16:50:27 +0000 (16:50 +0000)]
Work around a problem in t-mirror-lvconvert: different PV order on the
commandline of lvconvert can lead to allocation failures even if enough space
is available. A separate testcase demonstrating the problem will follow.

14 years agoEnforce distinct-PV allocation of snapshot/origin pairs in vgsplit test.
Petr Rockai [Mon, 29 Mar 2010 16:40:51 +0000 (16:40 +0000)]
Enforce distinct-PV allocation of snapshot/origin pairs in vgsplit test.

14 years agoDo not allow {vg|lv}change --ignoremonitoring if on clustered VG.
Mike Snitzer [Mon, 29 Mar 2010 16:09:40 +0000 (16:09 +0000)]
Do not allow {vg|lv}change --ignoremonitoring if on clustered VG.

clvmd does not propagate DMEVENTD_MONITOR_IGNORE.

Update get_activation_monitoring_mode() to check if the VG that the
LV is being activated in is clustered.  If so, skip it.

Any get_activation_monitoring_mode() error will cause the associated LV
(or VG) to be skipped during activation.  Both vgchange_single() and
lvchange_single(), which call get_activation_monitoring_mode(), are
called by their respective process_each_..() method.

14 years agoFix also error code from clean:
Zdenek Kabelac [Mon, 29 Mar 2010 15:53:11 +0000 (15:53 +0000)]
Fix also error code from clean:
And fix previous commit which missed test.

14 years agoOops, avoid returning errors from shell to makefile for builddir == srcdir
Zdenek Kabelac [Mon, 29 Mar 2010 15:39:25 +0000 (15:39 +0000)]
Oops, avoid returning errors from shell to makefile for builddir == srcdir

14 years agoAvoid modification of .in files outside man directory.
Zdenek Kabelac [Mon, 29 Mar 2010 14:22:00 +0000 (14:22 +0000)]
Avoid modification of .in files outside man directory.
(i.e. this rule actually tried to change ../make.tmpl in some cases and
left this file completely broken)

14 years agoSplit long line in Makefile and keep $abs_top_buildir as shell variable
Zdenek Kabelac [Mon, 29 Mar 2010 14:19:42 +0000 (14:19 +0000)]
Split long line in Makefile and keep $abs_top_buildir as shell variable
within init.sh.

14 years agoFixing another set of distclean problems where we left some generated files
Zdenek Kabelac [Mon, 29 Mar 2010 14:17:59 +0000 (14:17 +0000)]
Fixing another set of distclean problems where we left some generated files
in clvmd, dmevend, man, tests.

Don't include dependency files for clow and cscope.out targets

Improve dependency tracking for dmeventd and liblvm2cmd sources.

14 years agoUpdate cflow file generation - support build dir and use $(top_srcdir)
Zdenek Kabelac [Mon, 29 Mar 2010 14:11:17 +0000 (14:11 +0000)]
Update cflow file generation - support build dir and use $(top_srcdir)
to obtain sources. Create make.tmpl target for
simplier generation of cflow files with the help of
CFLOW_LIST, CFLOW_LIST_TARGET, CFLOW_TARGET.
Still cflow usage is not perfect.

14 years agodistclean fixes
Zdenek Kabelac [Mon, 29 Mar 2010 14:09:25 +0000 (14:09 +0000)]
distclean fixes

Move daemons/ and lib/ subtargets to their Makefiles so we don't get
double cleanup error during execution of distclean target.
Instead of duplicating clean target inside distclean target,
just use it as a subtarget and avoid add duplicating code.

14 years agoUse $(top_srcdir) for sources and add cscope.out to distclean targets.
Zdenek Kabelac [Mon, 29 Mar 2010 14:07:56 +0000 (14:07 +0000)]
Use $(top_srcdir) for sources and add cscope.out to distclean targets.

14 years agoAdd $(LIB_STATIC) to TARGETS so it's cleaned in the same way
Zdenek Kabelac [Mon, 29 Mar 2010 14:07:01 +0000 (14:07 +0000)]
Add $(LIB_STATIC) to TARGETS so it's cleaned in the same way
as other libraries in project.
Add dmeventd.gcda dmeventd.gcno to CLEAN_TARGETS.

14 years agoAvoid hard sed replacement - i.e. quick test change in make.tmpl
Zdenek Kabelac [Mon, 29 Mar 2010 14:06:06 +0000 (14:06 +0000)]
Avoid hard sed replacement - i.e. quick test change in make.tmpl
could avoid recofiguration steps in same debug cases.

14 years agoFixing compilation warning: implicit declaration of function ‘umask’
Zdenek Kabelac [Mon, 29 Mar 2010 14:05:17 +0000 (14:05 +0000)]
Fixing compilation warning: implicit declaration of function ‘umask’

14 years agoWhen a scsi_debug modprobe fails, skip the test instead of failing it.
Petr Rockai [Sun, 28 Mar 2010 15:52:04 +0000 (15:52 +0000)]
When a scsi_debug modprobe fails, skip the test instead of failing it.

14 years agoAdd ability to create mirrored logs for mirror LVs.
Jonathan Earl Brassow [Fri, 26 Mar 2010 22:15:43 +0000 (22:15 +0000)]
Add ability to create mirrored logs for mirror LVs.

This check-in enables the 'mirrored' log type.  It can be specified
by using the '--mirrorlog' option as follows:
#> lvcreate -m1 --mirrorlog mirrored -L 5G -n lv vg

I've also included a couple updates to the testsuite.  These updates
include tests for the new log type, and some fixes to some of the
*lvconvert* tests.

14 years agoUse a real socket for singlenode clvmd to fix clvmd's high cpu load.
Mike Snitzer [Fri, 26 Mar 2010 15:45:36 +0000 (15:45 +0000)]
Use a real socket for singlenode clvmd to fix clvmd's high cpu load.

14 years agoFix clvmd cluster propagation of dmeventd monitoring mode.
Mike Snitzer [Fri, 26 Mar 2010 15:40:13 +0000 (15:40 +0000)]
Fix clvmd cluster propagation of dmeventd monitoring mode.

clvmd's do_lock_lv() already properly controls dmeventd monitoring based
on LCK_DMEVENTD_MONITOR_MODE in lock_flags -- though one small fix was
needed for this to work: _lock_for_cluster() must treat
dmeventd_monitor_mode()'s return as a tri-state value.

Also cleanup do_lock_lv() to:
- explicitly init_dmeventd_monitor() based on LCK_DMEVENTD_MONITOR_MODE
- no longer reset init_dmeventd_monitor() to default at the end of
  do_lock_lv() -- it is unnecessary

14 years agoUpdates .so links for plugins
Zdenek Kabelac [Fri, 26 Mar 2010 13:21:28 +0000 (13:21 +0000)]
Updates .so links for plugins

14 years agoAllow ALLOC_ANYWHERE to split contiguous areas.
Alasdair Kergon [Thu, 25 Mar 2010 21:19:26 +0000 (21:19 +0000)]
Allow ALLOC_ANYWHERE to split contiguous areas.

14 years ago.
Alasdair Kergon [Thu, 25 Mar 2010 18:22:39 +0000 (18:22 +0000)]
.

14 years agoUse INTERNAL_ERROR definition consistently in internal error messages.
Alasdair Kergon [Thu, 25 Mar 2010 18:22:04 +0000 (18:22 +0000)]
Use INTERNAL_ERROR definition consistently in internal error messages.

14 years agoAdd some assertions to allocation code.
Alasdair Kergon [Thu, 25 Mar 2010 18:16:54 +0000 (18:16 +0000)]
Add some assertions to allocation code.

14 years agomore diagnostics
Alasdair Kergon [Thu, 25 Mar 2010 12:16:17 +0000 (12:16 +0000)]
more diagnostics

14 years agomore diagnostics
Alasdair Kergon [Thu, 25 Mar 2010 12:14:14 +0000 (12:14 +0000)]
more diagnostics

14 years agoadd debug mesg
Alasdair Kergon [Thu, 25 Mar 2010 11:57:16 +0000 (11:57 +0000)]
add debug mesg

14 years ago.
Alasdair Kergon [Thu, 25 Mar 2010 11:48:54 +0000 (11:48 +0000)]
.

14 years agoadd debug mesgs and attempt to control which device is used for log as perhaps intended
Alasdair Kergon [Thu, 25 Mar 2010 11:47:00 +0000 (11:47 +0000)]
add debug mesgs and attempt to control which device is used for log as perhaps intended

14 years agoadd debug output and attempt to control which device gets log as intended perhaps
Alasdair Kergon [Thu, 25 Mar 2010 11:42:17 +0000 (11:42 +0000)]
add debug output and attempt to control which device gets log as intended perhaps

14 years agoimprove a few comments in last check-in
Alasdair Kergon [Thu, 25 Mar 2010 02:40:09 +0000 (02:40 +0000)]
improve a few comments in last check-in

14 years agoIntroduce pv_area_used into allocation algorithm and add debug messages.
Alasdair Kergon [Thu, 25 Mar 2010 02:31:48 +0000 (02:31 +0000)]
Introduce pv_area_used into allocation algorithm and add debug messages.

This is the next preparatory step towards better --alloc anywhere
support and is not intended to break anything that currently works so
please report any problems - segfaults, bogus data in the new debug
messages, or if the code now chooses bizarre allocation layouts.

14 years agoRevert having clvmd consult the lvm.conf "activation/monitoring".
Mike Snitzer [Wed, 24 Mar 2010 22:25:11 +0000 (22:25 +0000)]
Revert having clvmd consult the lvm.conf "activation/monitoring".
Correctly implementing the intent of this change requires more
analysis.

14 years agoMove declaration of struct dm_info info to declaration block.
Zdenek Kabelac [Wed, 24 Mar 2010 11:36:48 +0000 (11:36 +0000)]
Move declaration of struct dm_info info to declaration block.

14 years agoImprove activation monitoring option processing
Mike Snitzer [Tue, 23 Mar 2010 22:30:18 +0000 (22:30 +0000)]
Improve activation monitoring option processing

. Add "monitoring" option to "activation" section of lvm.conf
. Have clvmd consult the lvm.conf "activation/monitoring" too.
. Introduce toollib.c:get_activation_monitoring_mode().
. Error out when both --monitor and --ignoremonitoring are provided.
. Add --monitor and --ignoremonitoring support to lvcreate.  Update
  lvcreate man page accordingly.
. Clarify that '--monitor' controls the start and stop of monitoring in
  the {vg,lv}change man pages.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
14 years agoAlso honour abort_on_internal_errors when log_fn is set.
Petr Rockai [Tue, 23 Mar 2010 18:18:49 +0000 (18:18 +0000)]
Also honour abort_on_internal_errors when log_fn is set.

14 years agoUDEV_SYNC_SUPPORT, not UDEV_SYNC!
Peter Rajnoha [Tue, 23 Mar 2010 15:13:03 +0000 (15:13 +0000)]
UDEV_SYNC_SUPPORT, not UDEV_SYNC!

14 years agoAllow dynamic extension of array of areas selected as allocation candidates.
Alasdair Kergon [Tue, 23 Mar 2010 15:07:55 +0000 (15:07 +0000)]
Allow dynamic extension of array of areas selected as allocation candidates.

14 years agoExport and use only valid cookie value in test suite.
Peter Rajnoha [Tue, 23 Mar 2010 14:47:35 +0000 (14:47 +0000)]
Export and use only valid cookie value in test suite.

14 years agoAutoreconf.
Peter Rajnoha [Tue, 23 Mar 2010 14:44:42 +0000 (14:44 +0000)]
Autoreconf.

(Strictly require libudev if udev_sync is used)

14 years agoStrictly require libudev if udev_sync is used.
Peter Rajnoha [Tue, 23 Mar 2010 14:43:18 +0000 (14:43 +0000)]
Strictly require libudev if udev_sync is used.

This prevents some confusion when libudev was not found so udev_sync was disabled
automatically. Configure was successful though giving only a tiny warning.

Also, if "dmsetup udevcreatecookie" is used, never return 0x000000 as a result if
udev is not running and keep the output blank.

14 years agoAdd support for ioctl's DM_UEVENT_GENERATED_FLAG.
Peter Rajnoha [Tue, 23 Mar 2010 14:38:37 +0000 (14:38 +0000)]
Add support for ioctl's DM_UEVENT_GENERATED_FLAG.

We need to know whether we should wait for any uevent or not when
using udev_sync. A kernel patch was posted recently that changed the
way uevents are sent on dm device resume - it is sent only if the
device has been suspended before. There's also a new DM_UEVENT_GENERATED_FLAG
in the ioctl to notify userspace whether the event was generated.

If the uevent was not generated (e.g. the situation where the device is
*not* suspended and we call a resume), we just call dm_udev_complete
explicitly from within libdevmapper itself to prevent infinite waiting
while trying to synchronise with udev processing.

14 years agoAvoid duplicate definitions.
Alasdair Kergon [Tue, 23 Mar 2010 14:35:08 +0000 (14:35 +0000)]
Avoid duplicate definitions.

14 years agoRemove const modifier for struct volume_group* from process_each_lv_in_vg().
Zdenek Kabelac [Tue, 23 Mar 2010 14:24:04 +0000 (14:24 +0000)]
Remove const modifier for struct volume_group* from process_each_lv_in_vg().
Content of this pointer is not const during this function.

14 years agoDon't allow resizing of internal logical volumes.
Mike Snitzer [Sat, 20 Mar 2010 03:44:04 +0000 (03:44 +0000)]
Don't allow resizing of internal logical volumes.

Prevent lvresize from being able to resize internal LVs: mirror legs
(*_mimage_*), mirror log (*_mlog), snapshot placeholder LVs (snapshot*)
and others.  Resizing these would leads to unexpected metadata and
sometimes crashes (in case of growing snapshot*).

14 years agoFix libdevmapper-event pkgconfig version string to match libdevmapper.
Alasdair Kergon [Fri, 19 Mar 2010 18:33:55 +0000 (18:33 +0000)]
Fix libdevmapper-event pkgconfig version string to match libdevmapper.

14 years agoUpdate WHATS_NEW for last checkin.
Dave Wysochanski [Thu, 18 Mar 2010 17:32:25 +0000 (17:32 +0000)]
Update WHATS_NEW for last checkin.

14 years agoAvoid scanning all pvs in the system if operating on a device with mdas.
Dave Wysochanski [Thu, 18 Mar 2010 17:29:12 +0000 (17:29 +0000)]
Avoid scanning all pvs in the system if operating on a device with mdas.

When we pv_read() a device that has an orphan vgname, we might need to scan
the system to be sure this is true.  However, if the PV has mdas, there's
no way possible for it to have an orphan vgname unless it is a true orphan.
Some areas of the code were optimized to take advantage of this fact, while
others were not (we would still do the expensive scan if a device had mdas
but had an orphan VG).

This patch unifies the code so that every place we are operating on such
a PV, we skip the expensive scan if there are mdas.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Acked-by: Petr Rockai <prockai@redhat.com>
Acked-by: Alasdair G Kergon <agk@redhat.com>
14 years agoautoreconf & add missing WHATS_NEW entry
Alasdair Kergon [Thu, 18 Mar 2010 13:24:35 +0000 (13:24 +0000)]
autoreconf & add missing WHATS_NEW entry

14 years agoRun both locking_type 1 and 3 tests (forgot to uncomment locking_type 1 before
Petr Rockai [Thu, 18 Mar 2010 09:28:42 +0000 (09:28 +0000)]
Run both locking_type 1 and 3 tests (forgot to uncomment locking_type 1 before
last checkin).

14 years agoSkip locking_type 3 tests instead of failing when system-wide clvmd is running.
Petr Rockai [Thu, 18 Mar 2010 09:27:39 +0000 (09:27 +0000)]
Skip locking_type 3 tests instead of failing when system-wide clvmd is running.

14 years agoAdd infrastructure for running the functional testsuite with locking_type set
Petr Rockai [Thu, 18 Mar 2010 09:19:30 +0000 (09:19 +0000)]
Add infrastructure for running the functional testsuite with locking_type set
to 3, using a local (singlenode) clvmd.

14 years agoAdd pvchange -u --all to testsuite.
Dave Wysochanski [Wed, 17 Mar 2010 17:02:01 +0000 (17:02 +0000)]
Add pvchange -u --all to testsuite.

This can be an interesting test case when using PVs with --metadatacopies 0.

14 years agotestsuite: get stacktrace if test drops core
Mike Snitzer [Wed, 17 Mar 2010 14:55:28 +0000 (14:55 +0000)]
testsuite: get stacktrace if test drops core

Requires lvm be built with debugging (-g).
Also requires 'ulimit -c' be non-zero (to drop core file).

14 years agoDisable long living process flag in lvm2app.
Milan Broz [Wed, 17 Mar 2010 14:45:28 +0000 (14:45 +0000)]
Disable long living process flag in lvm2app.

This option should be configurable, but for now
do not set it at all.

(lvm2app is used in udisks probers and there
cac cause several nasty races when trying to update
lvmcache during rescan.)

14 years agoFix pvcreate device check.
Milan Broz [Wed, 17 Mar 2010 14:44:18 +0000 (14:44 +0000)]
Fix pvcreate device check.

If user try to vgcreate or vgextend non-existent VG,
these messages appears:

# vgcreate xxx /dev/xxx
  Internal error: Volume Group xxx was not unlocked
  Device /dev/xxx not found (or ignored by filtering).
  Unable to add physical volume '/dev/xxx' to volume group 'xxx'.
  Internal error: Attempt to unlock unlocked VG xxx.

(the same with existing VG and non-existing PV & vgextend)
# vgextend vg_test /dev/xxx
...

It is caused because code tries to "refresh" cache if
md filter is switched on using cache destroy.

But we can change filters and rescan even without this
machinery now, just use refresh_filters
(and reset md filter afterwards).

(Patch also  discovers cache alias bug in vgsplit test,
fix it by using better filter line.)

14 years agoSuppress repeated errors about the same missing PV uuids.
Alasdair Kergon [Wed, 17 Mar 2010 02:11:18 +0000 (02:11 +0000)]
Suppress repeated errors about the same missing PV uuids.
Bypass full device scans when using internally-cached VG metadata.

14 years agofix last checkin
Alasdair Kergon [Tue, 16 Mar 2010 19:06:57 +0000 (19:06 +0000)]
fix last checkin

14 years agoOnly do one full device scan during each read of text format metadata.
Alasdair Kergon [Tue, 16 Mar 2010 17:30:00 +0000 (17:30 +0000)]
Only do one full device scan during each read of text format metadata.

14 years agoRemove unnecessary full_scan parameter from get_vgids and get_vgnames calls.
Alasdair Kergon [Tue, 16 Mar 2010 16:57:03 +0000 (16:57 +0000)]
Remove unnecessary full_scan parameter from get_vgids and get_vgnames calls.

14 years agoreplace existing_pv with existing_pvl
Alasdair Kergon [Tue, 16 Mar 2010 15:48:27 +0000 (15:48 +0000)]
replace existing_pv with existing_pvl

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