]> sourceware.org Git - lvm2.git/log
lvm2.git
14 years agoAdd a new helper script for the testsuite, that makes checking for various
Petr Rockai [Mon, 12 Apr 2010 19:02:59 +0000 (19:02 +0000)]
Add a new helper script for the testsuite, that makes checking for various
(lvm) properties easier and produces nicer output.

14 years agoDo not pollute /tmp with testing byproducts.
Petr Rockai [Mon, 12 Apr 2010 19:00:23 +0000 (19:00 +0000)]
Do not pollute /tmp with testing byproducts.

14 years agoDon't ignore error if resuming any LV fails in resume_lvs.
Alasdair Kergon [Mon, 12 Apr 2010 11:52:53 +0000 (11:52 +0000)]
Don't ignore error if resuming any LV fails in resume_lvs.
Skip closing persistent filter cache file if open failed.

14 years agoUpdate install rules for udev.
Zdenek Kabelac [Fri, 9 Apr 2010 21:44:28 +0000 (21:44 +0000)]
Update install rules for udev.

Fix unwanted modification of $(top_builddir)/make.tmpl.

Using dependency rules to install rules for udev.
There is minor problem, with concurent usage of builddir
and srcdir could lead to missuse of 10-dm.rules which
could be found in VPATH from different builddir.
However current solution uses intermediate target so
the generated 10-dm.rules exists only for short period of time
during make install execution.

14 years agoINSTALL rules updates
Zdenek Kabelac [Fri, 9 Apr 2010 21:42:48 +0000 (21:42 +0000)]
INSTALL rules updates

Patch is inspired by Debian's extra patch.

- removes OWNER & GROUP make vars they are parts of INSTALL command.
- adds INSTALL_PROGRAM for executable, uses $(INSTALL)
- adds INSTALL_DATA for non-executable data, uses ($INSTALL)
- adds INSTALL_WDATA for writable non-executable data, uses ($INSTALL)
- adds configure option --enable-write_install - to support
  installatin of writable files used by distribution
- replaces usage of ifeq @LIB_SUFFIX@ with $(LIB_SUFFIX)
- installs .a files from static builds without executable flag
- installs .a files to $(usrlibdir) instead of $(libdir)
- installs all static binaries to $(staticdir)
- create .so links for devel package in $(usrlibdir) instead of
  $(libdir)
- makes .so and .so.LIB_VERSION files within builddir
- removes VERSIONED_SHLIB and created versioned LIB_SHARED automagicaly
- install LIB_SHARED via install_lib_shared target
- install plugins via install_lib_shared_plugin target
- prints whole 'install' command during installation instead of less
  informative "Installing  $(something) $(somewhere)"
- install multiple man pages with one INSTALL command
- use DISTCLEAN_TARGETS instead of creating multiple distclean targets

14 years agoUse vpath instead of VPATH.
Zdenek Kabelac [Fri, 9 Apr 2010 21:34:25 +0000 (21:34 +0000)]
Use vpath instead of VPATH.

Usage of VPATH makes troubles when used within $(builddir).
Not only source files are being found through VPATH,
but targets as well. (make --debug=v)

Thus if user builds the code in $(srcdir) and also in some $(builddir)
he gets mangled results as some generated files (i.e. .export.sym)
are 'reused' from $(srcdir) instead of $(builddir).

This patch switches to use vpath were we could explicitly name
suffixes that should be looked via vpath - we must take care,
we do not generate files with these suffixes:
.c, .in, .po, .exported_symbols

14 years agoPermit mimage LVs to be striped in lvcreate and lvresize.
Alasdair Kergon [Fri, 9 Apr 2010 01:00:10 +0000 (01:00 +0000)]
Permit mimage LVs to be striped in lvcreate and lvresize.

14 years agoCheck for duplicate paths (pvids) on the commandline of vgcreate.
Dave Wysochanski [Thu, 8 Apr 2010 15:18:35 +0000 (15:18 +0000)]
Check for duplicate paths (pvids) on the commandline of vgcreate.

A user specifying duplicate paths on the cmdline of vgcreate will
get a message similar to the following:
vgcreate vgtest2 /dev/loop3 /dev/loop5
  Found duplicate PV jk1lXsKzwyOKlXq6bhaFFKMQQ06oPgu8: using /dev/loop5 not /dev/loop3
  Found duplicate PV jk1lXsKzwyOKlXq6bhaFFKMQQ06oPgu8: using /dev/loop3 not /dev/loop5
  Internal error: Duplicate PV id jk1lXs-Kzwy-OKlX-q6bh-aFFK-MQQ0-6oPgu8 detected for /dev/loop3 in vgtest2.

This is caught by vg_validate(), but it would be good to find
this condition earlier in the vgcreate code.  add_pv_to_vg()
currently checks by pvname, but does not look for duplcate pvids.
This patch adds the check for duplicate pvids and results in new
error output as follows:
vgcreate vgtest2 /dev/loop3 /dev/loop5
  Found duplicate PV jk1lXsKzwyOKlXq6bhaFFKMQQ06oPgu8: using /dev/loop5 not /dev/loop3
  Found duplicate PV jk1lXsKzwyOKlXq6bhaFFKMQQ06oPgu8: using /dev/loop3 not /dev/loop5
  Physical volume '/dev/loop5 (jk1lXs-Kzwy-OKlX-q6bh-aFFK-MQQ0-6oPgu8)' listed more than once.
  Unable to add physical volume '/dev/loop5' to volume group 'vgtest2'.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoAdd cleandir target.
Zdenek Kabelac [Thu, 8 Apr 2010 09:15:37 +0000 (09:15 +0000)]
Add cleandir target.

Using non-recursive cleandir target for resursive distclean and clean.
Avoids duplicated clean invocation during distclean.
Indent $(RM) parameters.

14 years agoAnd another test that should have been failing - normal allocation policy
Alasdair Kergon [Thu, 8 Apr 2010 01:58:06 +0000 (01:58 +0000)]
And another test that should have been failing - normal allocation policy
does not put stripes on the same disk as each other!

14 years agoanother incorrect test that should have been failing before
Alasdair Kergon [Thu, 8 Apr 2010 01:43:46 +0000 (01:43 +0000)]
another incorrect test that should have been failing before

14 years agomissing ?:
Alasdair Kergon [Thu, 8 Apr 2010 00:56:26 +0000 (00:56 +0000)]
missing ?:

14 years agosuppress bogus compiler warning
Alasdair Kergon [Thu, 8 Apr 2010 00:52:41 +0000 (00:52 +0000)]
suppress bogus compiler warning

14 years agoFix pvmove allocation to take existing parallel stripes into account.
Alasdair Kergon [Thu, 8 Apr 2010 00:28:57 +0000 (00:28 +0000)]
Fix pvmove allocation to take existing parallel stripes into account.

When moving parts of striped LVs, pvmove wouldn't care about leaving you with
two stripes on the same disk.  Now --alloc anywhere is needed for that.
(Tried and gave up on two alternative approaches before the one committed here.)

14 years agoOnly fail if the top-level LV fails to be deactivated - allow deactivation
Alasdair Kergon [Wed, 7 Apr 2010 23:51:34 +0000 (23:51 +0000)]
Only fail if the top-level LV fails to be deactivated - allow deactivation
of its dependencies to fail.

14 years agoDon't forget to cd into $TESTDIR in test-utils.sh / prepare_testdir.
Petr Rockai [Wed, 7 Apr 2010 21:38:01 +0000 (21:38 +0000)]
Don't forget to cd into $TESTDIR in test-utils.sh / prepare_testdir.

14 years agoIssue a message if the new type of deactivation failure happens.
Alasdair Kergon [Wed, 7 Apr 2010 21:25:09 +0000 (21:25 +0000)]
Issue a message if the new type of deactivation failure happens.
If this can happen during 'normal' operations, I need to know.

14 years agoFix a mis-override of $PWD in test-utils.sh.
Petr Rockai [Wed, 7 Apr 2010 21:19:20 +0000 (21:19 +0000)]
Fix a mis-override of $PWD in test-utils.sh.

14 years ago Fix incorrect removal of symlinks after LV deactivation fails.
Alasdair Kergon [Wed, 7 Apr 2010 20:04:41 +0000 (20:04 +0000)]
  Fix incorrect removal of symlinks after LV deactivation fails.

14 years agoSet ulimit -c to unlimited to allow coredumps to be collected and analysed in
Petr Rockai [Wed, 7 Apr 2010 16:04:22 +0000 (16:04 +0000)]
Set ulimit -c to unlimited to allow coredumps to be collected and analysed in
the testsuite.

14 years agoAvoid spurious skips in the testsuite due to obsoleted
Petr Rockai [Wed, 7 Apr 2010 16:00:19 +0000 (16:00 +0000)]
Avoid spurious skips in the testsuite due to obsoleted
dmsetup_has_dm_devdir_support_.

14 years agoWipe dm-ioctl parameters in memory after use.
Milan Broz [Wed, 7 Apr 2010 15:57:20 +0000 (15:57 +0000)]
Wipe dm-ioctl parameters in memory after use.

14 years agoRefactor the test utilities, dropping the legacy test-lib.sh and curtailing
Petr Rockai [Wed, 7 Apr 2010 14:46:26 +0000 (14:46 +0000)]
Refactor the test utilities, dropping the legacy test-lib.sh and curtailing
lvm-utils.sh. Clears up lots of unused code, should have little observable
impact (it does change test directory layout slightly).

14 years agoIn test harness, use fwrite(3) in place of write(2) to avoid mixing fd-level
Petr Rockai [Wed, 7 Apr 2010 09:48:11 +0000 (09:48 +0000)]
In test harness, use fwrite(3) in place of write(2) to avoid mixing fd-level
and FILE-level IO on stdout.

14 years agoKeep the testsuite stats correct in spite of failed-test repetition.
Petr Rockai [Wed, 7 Apr 2010 09:41:33 +0000 (09:41 +0000)]
Keep the testsuite stats correct in spite of failed-test repetition.

14 years agoMove a fragile testcase toward the end of t-mirror-lvconvert.sh.
Petr Rockai [Tue, 6 Apr 2010 23:04:45 +0000 (23:04 +0000)]
Move a fragile testcase toward the end of t-mirror-lvconvert.sh.

14 years agoPut back the `lvconvert -m+1 --mirrorlog disk' test in t-lvconvert-mirror.sh.
Petr Rockai [Tue, 6 Apr 2010 22:22:26 +0000 (22:22 +0000)]
Put back the `lvconvert -m+1 --mirrorlog disk' test in t-lvconvert-mirror.sh.

14 years agodisable another broken check in a test
Alasdair Kergon [Tue, 6 Apr 2010 18:13:43 +0000 (18:13 +0000)]
disable another broken check in a test

14 years agoFix is_partitioned_dev not to attempt to reopen device.
Alasdair Kergon [Tue, 6 Apr 2010 17:36:41 +0000 (17:36 +0000)]
Fix is_partitioned_dev not to attempt to reopen device.

14 years agoDisable broken test.
Alasdair Kergon [Tue, 6 Apr 2010 16:30:53 +0000 (16:30 +0000)]
Disable broken test.

14 years agoFix a thread race in clvmd that could cause lockups on very busy systems
Christine Caulfield [Tue, 6 Apr 2010 15:29:30 +0000 (15:29 +0000)]
Fix a thread race in clvmd that could cause lockups on very busy systems

14 years agoDisplay PVs created during tests
Alasdair Kergon [Tue, 6 Apr 2010 14:25:07 +0000 (14:25 +0000)]
Display PVs created during tests

14 years agoUsing 'not' if the test 'should' fail.
Zdenek Kabelac [Tue, 6 Apr 2010 14:24:13 +0000 (14:24 +0000)]
Using 'not' if the test 'should' fail.

14 years agoUpdate WHATS_NEW
Dave Wysochanski [Tue, 6 Apr 2010 14:07:11 +0000 (14:07 +0000)]
Update WHATS_NEW

14 years agoAdd add_pvl_to_vgs() - helper function to add a pv to a vg list.
Dave Wysochanski [Tue, 6 Apr 2010 14:04:54 +0000 (14:04 +0000)]
Add add_pvl_to_vgs() - helper function to add a pv to a vg list.

Small refactor of main places in the code where a pv is added to a
vg into a small function which adds the pv to the list and updates
the vg counts.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoRefactor format1 vg->pvs list add and vg->pv_count.
Dave Wysochanski [Tue, 6 Apr 2010 14:04:20 +0000 (14:04 +0000)]
Refactor format1 vg->pvs list add and vg->pv_count.

Refactor adding to the vg->pvs list and incrementing the count, which
will allow further refactoring.  Should be no functional change.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoRefactor _read_pv() code that updates vg->extent_count and vg->free_count.
Dave Wysochanski [Tue, 6 Apr 2010 14:04:03 +0000 (14:04 +0000)]
Refactor _read_pv() code that updates vg->extent_count and vg->free_count.

Simple refactor to mov code that updates the vg extent counts from a
single pv's counts close to the code that adds a pv to vg->pvs and
updates vg->pv_count.  No functional change.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoAdd pv to vg->pvs after check for maximum value of vg->extent_count.
Dave Wysochanski [Tue, 6 Apr 2010 14:03:43 +0000 (14:03 +0000)]
Add pv to vg->pvs after check for maximum value of vg->extent_count.

In add_pv_to_vg(), we should only add the pv to vg->pvs after all
internal checks have passed.  The check for vg->extent_count exeeding
maximum was after we added the pv to the list, so this function could
return a state of vg->pvs that did not reflect other parameters such
as vg->pv_count.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoAs lcov module is not installed with GD.pm dependency we need
Zdenek Kabelac [Tue, 6 Apr 2010 11:53:53 +0000 (11:53 +0000)]
As lcov module is not installed with GD.pm dependency we need
to check for presence of this module and avoid using --frames
option for genhtml in this case.

Fix arg list for AC_PATH_PROG for lcov and genhtml.
(detecting empty LCOV and GENHTML string in Makefiles).

14 years agoDistcleanup config files only in toplevel directory.
Zdenek Kabelac [Tue, 6 Apr 2010 09:54:11 +0000 (09:54 +0000)]
Distcleanup config files only in toplevel directory.
Do not execute 'rm -r' with empty $(DISTCLEAN_DIRS).
lvm-version.h is already cleaned with subtarget distcleaning.
Always distcleanup lcov_reports*.

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.

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