]> sourceware.org Git - lvm2.git/log
lvm2.git
14 years agoFix warnings with conversion of uuid.
Dave Wysochanski [Wed, 19 May 2010 12:12:47 +0000 (12:12 +0000)]
Fix warnings with conversion of uuid.

More cleanup of uuid casting / structures is needed but for now just
cast like the rest of the code.

14 years agoUpdate WHATS_NEW
Dave Wysochanski [Wed, 19 May 2010 11:57:05 +0000 (11:57 +0000)]
Update WHATS_NEW

14 years agoTest lvm_vgname_from_{pvid|device}.
Dave Wysochanski [Wed, 19 May 2010 11:53:30 +0000 (11:53 +0000)]
Test lvm_vgname_from_{pvid|device}.

14 years agoAdd lvm2app interfaces to lookup a vgname from a pvid and pvname.
Dave Wysochanski [Wed, 19 May 2010 11:53:12 +0000 (11:53 +0000)]
Add lvm2app interfaces to lookup a vgname from a pvid and pvname.

lvm2app forces applications to start with a volume group name,
open the volume group, then operate on individual pvs.  In some
cases the application may want to start with a device name rather
than the volume group name.  Today, if an application wants to
do this, it must iterate through all the volume groups to find
the volume group that the specific device is attached to.
These new interfaces allow the application to avoid such overhead.
Bump the lvm2app version number to 3.

14 years agoUpdate pvchange to always obtain a vg handle for each pv to process.
Dave Wysochanski [Wed, 19 May 2010 11:53:00 +0000 (11:53 +0000)]
Update pvchange to always obtain a vg handle for each pv to process.

Earlier patches added some infrastructure to lookup a vgname from
a pvname.  We now can cleanup some of the pvchange and other code
by requiring callers that want to modify some pv property:
1) lookup the vgname by the pvname
2) use the vgname to obtain a vg handle
3) get the pv handle from the vg handle

This should work going forward and be a much cleaner interface,
as we move away from pvs as standalone objects.

14 years agoAdd find_vgname_from_{pvname|pvid} functions.
Dave Wysochanski [Wed, 19 May 2010 11:52:37 +0000 (11:52 +0000)]
Add find_vgname_from_{pvname|pvid} functions.

Some commands start with a pvname, but we'd like to force users to
start with a vg handle to obtain a pv handle.  Our best option seems
to be providing a way to look up the vgname from the pvname, and then
require them to use vg_read/vg_open.

In addition to the pvname lookup function, this patch also provides a
lookup by pvid.  The lookup by pvid can be used in conjunction with
lvmcache_get_pvids to process all pvs in the system.

The pvid find function first calls lvmcache_vgname_from_pvid, which may
cause the label to be read if it is not in the cache.  If the vgname is
returned is an orphan, we then check to see if there are metadata areas,
and if not, we scan every PV on the system by calling scan_vgs_for_pvs().
In most cases we should not need to do this, and by using the info->mdas
count, we avoid calling pv_read() as prior code did.  So this patch is a
bit cleaner and should allow us to refactor more of the pv code.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoAdd lvmcache_vgname_from_pvid().
Dave Wysochanski [Wed, 19 May 2010 11:52:21 +0000 (11:52 +0000)]
Add lvmcache_vgname_from_pvid().

Add lvmcache function to lookup a vgname from a pvid.

14 years agoAdd pvid_from_devname() lvmcache function.
Dave Wysochanski [Wed, 19 May 2010 11:52:07 +0000 (11:52 +0000)]
Add pvid_from_devname() lvmcache function.

Add supporting function for mappings from devname -> pvid -> vgname.

14 years agoAdd is_global_vg and split out from is_orphan_vg.
Alasdair Kergon [Wed, 19 May 2010 02:36:33 +0000 (02:36 +0000)]
Add is_global_vg and split out from is_orphan_vg.

14 years agoValidate orphan and VG_GLOBAL lock order too.
Alasdair Kergon [Wed, 19 May 2010 02:08:50 +0000 (02:08 +0000)]
Validate orphan and VG_GLOBAL lock order too.

14 years agoNote that orphan lock is always obtained last
Alasdair Kergon [Wed, 19 May 2010 01:49:08 +0000 (01:49 +0000)]
Note that orphan lock is always obtained last

14 years agoAccept orphan VG names as parameters to lock_vol() and related functions.
Alasdair Kergon [Wed, 19 May 2010 01:16:40 +0000 (01:16 +0000)]
Accept orphan VG names as parameters to lock_vol() and related functions.

14 years agoUse is_orphan_vg in place of hard-coded prefix tests.
Alasdair Kergon [Wed, 19 May 2010 00:52:55 +0000 (00:52 +0000)]
Use is_orphan_vg in place of hard-coded prefix tests.

14 years agopost-release
Alasdair Kergon [Mon, 17 May 2010 20:18:13 +0000 (20:18 +0000)]
post-release

14 years agopre-release
Alasdair Kergon [Mon, 17 May 2010 18:39:01 +0000 (18:39 +0000)]
pre-release

14 years agoFix clvmd init script stop function to not deactive non-clustered volume groups.
Fabio M. Di Nitto [Mon, 17 May 2010 03:18:27 +0000 (03:18 +0000)]
Fix clvmd init script stop function to not deactive non-clustered volume groups.

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

14 years agoDisallow toggling the cluster attribute of a volume group if there
Jonathan Earl Brassow [Fri, 14 May 2010 15:19:42 +0000 (15:19 +0000)]
Disallow toggling the cluster attribute of a volume group if there
are active mirrors or snapshots.

We don't have the mechanisms in place to change the device-mapper
tables for those targets that have behavioral differences between
cluster and single machine instances.  Allowing users to change
the attribute but not changing the target's behavior can lead to
data corruption.

The following bugs are fixed/avoided by this patch:
235123 - vgchange -c [ny] do not change target types when necessary
289331 - RFE: switching from cluster domain to local domain needs to deactivate volume somehow
289541 - when changing from local to cluster, volumes can not appear to be deactivated

14 years agoUse -d to control level of messages sent to syslog by dmeventd.
Alasdair Kergon [Fri, 14 May 2010 14:56:39 +0000 (14:56 +0000)]
Use -d to control level of messages sent to syslog by dmeventd.
Change -d to -f to run dmeventd in foreground.
(mornfall)

14 years agoFix static build.
Alasdair Kergon [Fri, 14 May 2010 13:36:56 +0000 (13:36 +0000)]
Fix static build.

14 years agoFor lcov target there is no need to include source file dependencies
Zdenek Kabelac [Fri, 14 May 2010 13:32:36 +0000 (13:32 +0000)]
For lcov target there is no need to include source file dependencies

14 years agoAnother one internal device layer fix...
Milan Broz [Fri, 14 May 2010 12:39:52 +0000 (12:39 +0000)]
Another one internal device layer fix...

14 years agoFix empty layer detection is scan devices.
Milan Broz [Fri, 14 May 2010 12:30:43 +0000 (12:30 +0000)]
Fix empty layer detection is scan devices.

14 years agoFix device_is_usable to properly detect only internal LV names.
Milan Broz [Fri, 14 May 2010 12:03:32 +0000 (12:03 +0000)]
Fix device_is_usable to properly detect only internal LV names.

14 years agoUse /bin/bash for scripts with bashisms
Zdenek Kabelac [Fri, 14 May 2010 11:33:20 +0000 (11:33 +0000)]
Use /bin/bash for scripts with bashisms

14 years agoSkip also special lvm devices in scan (if ignore suspended is used).
Milan Broz [Thu, 13 May 2010 18:38:38 +0000 (18:38 +0000)]
Skip also special lvm devices in scan (if ignore suspended is used).

This should avoid various races between dmeventd on multiple nodes
in cluster where one node already repairing device and another
run full scan and locks the device.

14 years agoDo not print encryption key in message debug output.
Milan Broz [Thu, 13 May 2010 13:31:30 +0000 (13:31 +0000)]
Do not print encryption key in message debug output.

14 years agoCurrently if clvmd is running and user issues vgscan,
Milan Broz [Thu, 13 May 2010 13:04:03 +0000 (13:04 +0000)]
Currently if clvmd is running and user issues vgscan,
the device cache file is dumped both in vgscan and clvmd process.

Unfortunately, clvmd calls lvmcache_label_scan,
it properly destroys persistent filter, but during
persistent_filter_dump it merges old cache content back!

This causes that change in filters is not properly propagated
into device cache after vgscan on cluster.
(Only new devices are added.)

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

14 years agoChop up the big t-lvconvert-mirror-basic loop across 4 separate test scripts
Petr Rockai [Wed, 12 May 2010 13:15:38 +0000 (13:15 +0000)]
Chop up the big t-lvconvert-mirror-basic loop across 4 separate test scripts
(and use sourcing to avoid code duplication).

14 years agoRun tests in alphabetical (and thus stable across machines) order.
Petr Rockai [Wed, 12 May 2010 11:59:46 +0000 (11:59 +0000)]
Run tests in alphabetical (and thus stable across machines) order.

14 years agoBump the debug.log level from 4 to 9 (the numbering is different from verbose).
Petr Rockai [Wed, 12 May 2010 11:58:51 +0000 (11:58 +0000)]
Bump the debug.log level from 4 to 9 (the numbering is different from verbose).

14 years agoRevert the "repeat failed tests with -vvvv" feature. Instead, dump debug logs
Petr Rockai [Wed, 12 May 2010 11:23:16 +0000 (11:23 +0000)]
Revert the "repeat failed tests with -vvvv" feature. Instead, dump debug logs
to a file using log/file, with log/overwrite set and dump this file in
STACKTRACE. The overall effect is that only the command that ran last before
the failure has been triggered will get its debug output logged. This is
similar to how we treat coredumps.

14 years agoA fairly extensive refactor of the mirror testing code. The exhaustive
Petr Rockai [Wed, 12 May 2010 10:08:35 +0000 (10:08 +0000)]
A fairly extensive refactor of the mirror testing code. The exhaustive
lvconvert testing is now in its own test, t-lvconvert-mirror-basic ... it
doesn't do anything fancy but it does run lvconvert through a lot of
combinations.

I have also merged the remaining t-mirror-lvconvert tests into
t-lvconvert-mirror and abolished the former. The latter will be split again
later into more thematic divisions. (The previous split was rather arbitrary,
may I even say random...)

14 years agoRevert the huge device creation in t-lvconvert-mirror and downgrade the
Petr Rockai [Wed, 12 May 2010 06:09:22 +0000 (06:09 +0000)]
Revert the huge device creation in t-lvconvert-mirror and downgrade the
race-induced failure to a warning, until we have a better fix for this.

14 years agoAdd a test for activation in presence of missing devices. This partially covers
Petr Rockai [Wed, 12 May 2010 06:02:28 +0000 (06:02 +0000)]
Add a test for activation in presence of missing devices. This partially covers
the robustness requirements for system startup that we have.

14 years agoRename t-partial-activate to t-activate-partial (more activation tests coming).
Petr Rockai [Wed, 12 May 2010 05:59:24 +0000 (05:59 +0000)]
Rename t-partial-activate to t-activate-partial (more activation tests coming).

14 years agoThe "should" testing utility should actually only give a warning when the
Petr Rockai [Wed, 12 May 2010 05:55:42 +0000 (05:55 +0000)]
The "should" testing utility should actually only give a warning when the
command fails.

14 years agoImprove the "check" testing utility: slightly refactor and provide
Petr Rockai [Wed, 12 May 2010 05:55:08 +0000 (05:55 +0000)]
Improve the "check" testing utility: slightly refactor and provide
active/inactive checks.

14 years agoIf we are checking if '--nosync' was called with the mirror argument,
Jonathan Earl Brassow [Tue, 11 May 2010 21:40:11 +0000 (21:40 +0000)]
If we are checking if '--nosync' was called with the mirror argument,
then let's also check if '--mirrorlog' was called with the mirror
argument.

14 years agoAdd pkgconfigdir for placement of .pc files
Zdenek Kabelac [Tue, 11 May 2010 08:57:02 +0000 (08:57 +0000)]
Add pkgconfigdir for placement of .pc files

Use easily overideable make install pkgconfigdir variable.

14 years agoSwitch to use Requires.private for devmapper.pc and lvm2app.pc
Zdenek Kabelac [Tue, 11 May 2010 08:54:11 +0000 (08:54 +0000)]
Switch to use Requires.private for devmapper.pc and lvm2app.pc

Use Requires.private: instead of Libs.private:
Use UDEV_PC and SELINUX_PC for Require.private:

It looks like usage of Requires.private is prefered from Libs.private.
However pkg-config documentation is really poor here. But here is
short outcome:

There is a difference in Libs.private: and Requires.private: where
we specify libselinux instead of  -lselinux -lsepol.

We leave resolving of query like 'pkg-config --libs --static devmapper'
on taking proper selinux and udev libs to their .pc files instead of
hardcoding them into our .pc file which is might give incorrect answer.
- i.e. dependency of libselinux package might change and we may return
wrong list of linked libraries.

http://bugs.freedesktop.org/show_bug.cgi?id=4738
http://err.no/personal/blog/tech/2008-03-25-18-07_pkg-config,_sonames_and_Requires.private

14 years agoAdd UDEV_PC and SELINUX_PC substituted variables
Zdenek Kabelac [Tue, 11 May 2010 08:48:43 +0000 (08:48 +0000)]
Add UDEV_PC and SELINUX_PC substituted variables

14 years agoUse Require.private: field for devmapper-event.pc
Zdenek Kabelac [Tue, 11 May 2010 08:47:02 +0000 (08:47 +0000)]
Use Require.private: field for devmapper-event.pc

Move devmapper to Require.private: field and remove unneeded libs
from Libs.private: as they are dependencies of devmapper library.

14 years agoSkip unneeded 'cat' command execution.
Zdenek Kabelac [Tue, 11 May 2010 08:43:18 +0000 (08:43 +0000)]
Skip unneeded 'cat' command execution.

14 years agoPlugins do not use pthread or lvm2cmd directly.
Zdenek Kabelac [Tue, 11 May 2010 08:41:58 +0000 (08:41 +0000)]
Plugins do not use pthread or lvm2cmd directly.

Plugins are using pthread and lvm2cmd libraries indirectly
through devmapper-event-lvm2, so link only with libraries used by them.

14 years agoLink libdevmapper-event.so with libdevmapper.so.
Zdenek Kabelac [Tue, 11 May 2010 08:38:10 +0000 (08:38 +0000)]
Link libdevmapper-event.so with libdevmapper.so.
For now using $(LIBS) for a list of linked libraries to $(LIB_SHARED) library.

14 years agoLink liblvm2cmd.so with devmapper-event and devmapper libs.
Zdenek Kabelac [Tue, 11 May 2010 08:34:38 +0000 (08:34 +0000)]
Link liblvm2cmd.so with devmapper-event and devmapper libs.
and remove generic %.so: %.a target.

14 years agoHeaderfile <pthread.h> is no longer needed here
Zdenek Kabelac [Tue, 11 May 2010 08:32:22 +0000 (08:32 +0000)]
Headerfile <pthread.h> is no longer needed here

14 years agoFix truncated total size displayed by pvscan.
Alasdair Kergon [Fri, 7 May 2010 15:24:17 +0000 (15:24 +0000)]
Fix truncated total size displayed by pvscan.

14 years agoAdd a basic test for dmeventd triggering lvconvert --repair. Needs improvement.
Petr Rockai [Thu, 6 May 2010 19:01:26 +0000 (19:01 +0000)]
Add a basic test for dmeventd triggering lvconvert --repair. Needs improvement.

14 years agoAdd some basic provisions for automated testing of dmeventd.
Petr Rockai [Thu, 6 May 2010 18:54:51 +0000 (18:54 +0000)]
Add some basic provisions for automated testing of dmeventd.

14 years agoAdd new --sysinit option for vgchange and lvchange.
Peter Rajnoha [Thu, 6 May 2010 11:15:55 +0000 (11:15 +0000)]
Add new --sysinit option for vgchange and lvchange.

A shortcut for --ignorelockingfailure, --ignoremonitoring, --poll n options
and LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment variable used all at
once in initialisation scripts (e.g. rc.sysinit or initrd).

14 years agoAdd dm_list_splice() to join two lists.
Zdenek Kabelac [Thu, 6 May 2010 10:10:15 +0000 (10:10 +0000)]
Add dm_list_splice() to join two lists.

14 years agoInstall plugins to subdirs
Zdenek Kabelac [Thu, 6 May 2010 10:07:46 +0000 (10:07 +0000)]
Install plugins to subdirs

Target install_dm_plugin installs files to libdir/device-mapper.
Target install_lvm2_plugin installs files to libdir/lvm2.

Both targets creates relative links to libdir to keep the code
compatible with current dlopen handling.

Once we will be able to read plugins from subdir, links
could be removed.

14 years agoWhat's new.
Petr Rockai [Wed, 5 May 2010 22:38:31 +0000 (22:38 +0000)]
What's new.

14 years agoSuppress duplicate error messages about read failures and missing devices.
Petr Rockai [Wed, 5 May 2010 22:37:52 +0000 (22:37 +0000)]
Suppress duplicate error messages about read failures and missing devices.

14 years agoSpecify exactly which ioctl doesn't have a cookie set (for better debugging).
Peter Rajnoha [Mon, 3 May 2010 22:08:38 +0000 (22:08 +0000)]
Specify exactly which ioctl doesn't have a cookie set (for better debugging).

14 years agoSynchronize "remove" dm task while reverting unsuccessful "create" dm task
Peter Rajnoha [Mon, 3 May 2010 21:06:53 +0000 (21:06 +0000)]
Synchronize "remove" dm task while reverting unsuccessful "create" dm task
(with table provided).

This remove ioctl generates udev events like any other hence it needs to be
synchronized properly as well. Also, add dm task type in debug log when
setting a cookie (for better debugging).

14 years agopost-release
Alasdair Kergon [Fri, 30 Apr 2010 15:48:38 +0000 (15:48 +0000)]
post-release

14 years agotypo
Alasdair Kergon [Fri, 30 Apr 2010 14:51:58 +0000 (14:51 +0000)]
typo

14 years agopre-release
Alasdair Kergon [Fri, 30 Apr 2010 14:49:42 +0000 (14:49 +0000)]
pre-release

14 years agoAdd a "should" alongside "not" to the test utilities. When a "should" command
Petr Rockai [Fri, 30 Apr 2010 14:33:39 +0000 (14:33 +0000)]
Add a "should" alongside "not" to the test utilities. When a "should" command
fails, the test will carry on but will issue a warning. The harness detects
such warnings from tests and marks tests that passed with warnings with a
special status.

14 years agochange awk path
Alasdair Kergon [Fri, 30 Apr 2010 13:58:08 +0000 (13:58 +0000)]
change awk path

14 years agoAnd be consistent with return code as well (previous commit).
Peter Rajnoha [Fri, 30 Apr 2010 13:47:11 +0000 (13:47 +0000)]
And be consistent with return code as well (previous commit).

14 years agoDon't run any complex initialisation for the "version" lvm2 command.
Peter Rajnoha [Fri, 30 Apr 2010 13:28:44 +0000 (13:28 +0000)]
Don't run any complex initialisation for the "version" lvm2 command.

We can use it even in read-only environment where a try to initialise
file-based locking fails (not to mention other processing related with
lvm2 init). Simply, we want to output the version only, nothing else.
And this should always work.

14 years agoInitialise _vginfos list staticaly so there is no problem with using uninitialised
Zdenek Kabelac [Fri, 30 Apr 2010 12:54:31 +0000 (12:54 +0000)]
Initialise _vginfos list staticaly so there is no problem with using uninitialised
variables in case, lvmcache_destory() is called without lvmcache_init().

14 years agoRelease pools for regex if there is error during processing
Zdenek Kabelac [Fri, 30 Apr 2010 12:37:04 +0000 (12:37 +0000)]
Release pools for regex if there is error during processing
(fixes error messages about unreleased pools).

14 years agoShow string with invalid pattern
Zdenek Kabelac [Fri, 30 Apr 2010 12:31:32 +0000 (12:31 +0000)]
Show string with invalid pattern
and start error message with capital letter.

14 years ago.
Alasdair Kergon [Thu, 29 Apr 2010 01:48:19 +0000 (01:48 +0000)]
.

14 years ago.
Alasdair Kergon [Thu, 29 Apr 2010 01:45:30 +0000 (01:45 +0000)]
.

14 years agoRemove no-longer-used arg_ptr_value.
Alasdair Kergon [Thu, 29 Apr 2010 01:38:12 +0000 (01:38 +0000)]
Remove no-longer-used arg_ptr_value.
Fix -M and --type to use strings not pointers that change on config refresh.

14 years agoTest all combinations of mirror conversion, both while the LV
Jonathan Earl Brassow [Wed, 28 Apr 2010 17:46:34 +0000 (17:46 +0000)]
Test all combinations of mirror conversion, both while the LV
is active and while it is in-active.

+for i in $(seq 0 4); do
+       for j in $(seq 0 4); do
+               for k in core disk mirrored; do
+                       for l in core disk mirrored; do

The testing code still needs some improvement.  I'd like to add
the ability to test specifying the PVs to be added/removed during
a convert.  It will also be important to test partial PV
specification during down converts (i.e. request to remove more
mirror images than we have provided PVs for).

14 years agoDon't attempt to convert the log type of an LV if the LV
Jonathan Earl Brassow [Wed, 28 Apr 2010 17:41:30 +0000 (17:41 +0000)]
Don't attempt to convert the log type of an LV if the LV
is not a mirror.

14 years agoAdd support for new IMPORT{db} udev rule.
Peter Rajnoha [Wed, 28 Apr 2010 13:37:36 +0000 (13:37 +0000)]
Add support for new IMPORT{db} udev rule.

This rule appeared in udev v152 and it helps us to support spurious events
where we didn't have any flags set (events originated in udevadm trigger
or the watch rule). These flags are important to direct the rule application.
Now, with the help of this rule, we can regenerate old udev db content.
To implement this correctly, we need to flag all proper DM udev events with
DM_UDEV_PRIMARY_SOURCE_FLAG. That happens automatically for all ioctls
generating events originated in libdevmapper.

14 years agoSmall indent change
Zdenek Kabelac [Wed, 28 Apr 2010 12:23:11 +0000 (12:23 +0000)]
Small indent change

14 years agoFix comment from last commit. Additionally, there is no need
Jonathan Earl Brassow [Tue, 27 Apr 2010 15:26:58 +0000 (15:26 +0000)]
Fix comment from last commit.  Additionally, there is no need
to put a comment into the WHATS_NEW file if it is a regression
that was created and fixed inside the same release window.

14 years agoPatch to fix bug 586021 and mantain historical behavior of
Jonathan Earl Brassow [Tue, 27 Apr 2010 14:57:49 +0000 (14:57 +0000)]
Patch to fix bug 586021 and mantain historical behavior of
being able to remove more images from a mirror than the
number of PVs directly specified for removal.

The effort to fix bug 581611 corrected a bug that was unnoticed
at the time.  The loop in _remove_mirror_images that looks over
the specified PVs was allowing devices that were previously
counted and moved to the end of the list to be double-counted.
This resulted in the number of devices needed for removal always
being satisfied - even if the user did not specify enough PVs
for removal to satisfy the request.  When 581611 was fixed, this
double-counting no longer took place and the result was to remove
only the minimum of the number of PVs specified or the number
that was asked to be removed.

By simply always setting 'new_area_count' (as used to be done
only in the else statement), we return to the previous behavior.
Indeed, this is exactly what the double-counting was allowing
to happen before the fix of 581611.

14 years agoMention how to get PV to LV mappings.
Alasdair Kergon [Tue, 27 Apr 2010 13:34:56 +0000 (13:34 +0000)]
Mention how to get PV to LV mappings.

14 years agoFix lvconvert error message when existing mirrored LV is not found.
Alasdair Kergon [Mon, 26 Apr 2010 18:31:58 +0000 (18:31 +0000)]
Fix lvconvert error message when existing mirrored LV is not found.

14 years agoadd comments
Alasdair Kergon [Mon, 26 Apr 2010 18:12:40 +0000 (18:12 +0000)]
add comments

14 years agoAlso include udev libs in libdevmapper.pc when udev_sync is enabled.
Peter Rajnoha [Mon, 26 Apr 2010 09:05:50 +0000 (09:05 +0000)]
Also include udev libs in libdevmapper.pc when udev_sync is enabled.

14 years agoDisallow the direct removal of a merging snapshot.
Mike Snitzer [Fri, 23 Apr 2010 19:27:10 +0000 (19:27 +0000)]
Disallow the direct removal of a merging snapshot.

Allow lv_remove_with_dependencies() to know the top-level LV that was
requested to be removed (otherwise it recurses and we lose context).

A merging snapshot cannot be removed directly but the associated origin
can be.  Disallow removal of a merging snapshot unless the associated
origin is also being removed.

14 years agoRemove redundant check in _lvs_single now that the caller
Mike Snitzer [Fri, 23 Apr 2010 19:10:20 +0000 (19:10 +0000)]
Remove redundant check in _lvs_single now that the caller
(process_each_lv_in_vg) provides it.

Also, removing this check from _lvs_single now allows displaying hidden
LVs that are specifically named on the command line.

14 years agoSet appropriate udev flags for reserved LVs.
Peter Rajnoha [Fri, 23 Apr 2010 14:16:32 +0000 (14:16 +0000)]
Set appropriate udev flags for reserved LVs.

There's no need for foreign udev rules to touch LVM reserved devices
(snapshot, pvmove, _mlog, _mimage, _vorigin) even if they happen to
be visible. The same applies for /dev/disk content - no need to create
any content for these devices (and so no need to run any "blkid" etc.).
This also prevents setting any inotify "watch" from udev rules on such
devices that is a source of race conditions (the rules need to honor
DM_UDEV_DISABLE_OTHER_RULES_FLAG for this to work though).

14 years agoWhen removing a snapshot avoid preloading the origin if the
Mike Snitzer [Fri, 23 Apr 2010 02:57:39 +0000 (02:57 +0000)]
When removing a snapshot avoid preloading the origin if the
snapshot-merge target is not active.

14 years agodon't optimise anything with TARGET_TRANS to avoid intefering with the matcher's...
Alasdair Kergon [Thu, 22 Apr 2010 23:09:18 +0000 (23:09 +0000)]
don't optimise anything with TARGET_TRANS to avoid intefering with the matcher's counting

14 years agoCache bitset locations to speed up _calc_states. (kabi)
Alasdair Kergon [Thu, 22 Apr 2010 20:35:24 +0000 (20:35 +0000)]
Cache bitset locations to speed up _calc_states. (kabi)

14 years agoavoid ORs rightmost
Alasdair Kergon [Thu, 22 Apr 2010 20:15:00 +0000 (20:15 +0000)]
avoid ORs rightmost

14 years agoMove regex printing code from test to main tree (may use in debug messages).
Alasdair Kergon [Thu, 22 Apr 2010 17:42:38 +0000 (17:42 +0000)]
Move regex printing code from test to main tree (may use in debug messages).
Yet another optimiser fix attempt.

14 years agoThe following tests in the testsuite have race conditions:
Jonathan Earl Brassow [Thu, 22 Apr 2010 15:39:40 +0000 (15:39 +0000)]
The following tests in the testsuite have race conditions:
1) Test that the primary mirror image cannot be removed while
   the mirror set is sync'ing.
2) Test that you cannot start a second mirror up-convert while
   one is already in progress.

The trouble is that if the sync/conversion finishes before the
tests occur, the tests will fail by why of success where there
should have been failure.  This means the sync/conversion must
happen very quickly, but this is possible because the test
mirrors we are creating are so small.

In order to decrease the likelyhood of these test failing (or
more correctly, failing to test the right thing), I've increase
the size of the mirrors.  It will still be remotely possible that
the tests will fail (by way of failing to test the right thing).
If this continues to happen, more involved mechanisms will need
to be put in place.  (Perhaps these will still be created, but
this change should be a remedy until that time.)

14 years agoDon't walk rightmost through NULL pointers.
Alasdair Kergon [Thu, 22 Apr 2010 14:33:14 +0000 (14:33 +0000)]
Don't walk rightmost through NULL pointers.

14 years agoFix rightmost rotation, and use LEFT and RIGHT to make symmetry more obvious.
Alasdair Kergon [Thu, 22 Apr 2010 13:42:34 +0000 (13:42 +0000)]
Fix rightmost rotation, and use LEFT and RIGHT to make symmetry more obvious.

14 years agofix leftmost rotation
Alasdair Kergon [Thu, 22 Apr 2010 13:18:27 +0000 (13:18 +0000)]
fix leftmost rotation

14 years agoisprint
Alasdair Kergon [Thu, 22 Apr 2010 03:42:00 +0000 (03:42 +0000)]
isprint

14 years agoStill not satisfactory...
Alasdair Kergon [Thu, 22 Apr 2010 03:24:24 +0000 (03:24 +0000)]
Still not satisfactory...

14 years agoadd -r to print out closer to original regex format
Alasdair Kergon [Thu, 22 Apr 2010 03:12:01 +0000 (03:12 +0000)]
add -r to print out closer to original regex format

14 years agoDisallow the addition of mirror images while a mirror up-convert
Jonathan Earl Brassow [Wed, 21 Apr 2010 14:04:24 +0000 (14:04 +0000)]
Disallow the addition of mirror images while a mirror up-convert
is already occurring.  The addition of new legs can be retried
once the current conversion is complete.

14 years agoDisallow the primary mirror image from being removed when the
Jonathan Earl Brassow [Wed, 21 Apr 2010 13:55:08 +0000 (13:55 +0000)]
Disallow the primary mirror image from being removed when the
mirror is not in-sync.  This restriction is not extended to
repair operations (i.e. it will not limit what 'lvconvert --repair'
can do).

14 years agoMake matcher_t and parse_t compilable
Zdenek Kabelac [Wed, 21 Apr 2010 08:01:51 +0000 (08:01 +0000)]
Make matcher_t and parse_t compilable

These two old-test/regex utils are usable for testing output of regex
processing at core level. For getting them usable configure need to create
Makefile. This is currently disable by default.

14 years agoAdd a regex optimisation pass for shared character prefixes.
Alasdair Kergon [Tue, 20 Apr 2010 22:31:22 +0000 (22:31 +0000)]
Add a regex optimisation pass for shared character prefixes.

14 years agoRe-enable t-topology-support.sh
Mike Snitzer [Tue, 20 Apr 2010 18:18:59 +0000 (18:18 +0000)]
Re-enable t-topology-support.sh

Reintroduce split teardown (teardown() calls teardown_devs()) because
t-topology-support.sh only needs the teardown_devs() subset of the full
teardown() between each iteration of the topology tests -- in particular
the $TESTDIR must not get removed between each topology test iteration.

prepare_loop() must return if prepare_scsi_debug_dev() already
established $LOOP.

Also fix (and simplify) the unsafe scsi-debug device discovery in
prepare_scsi_debug_dev().

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