1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00
Commit Graph

4308 Commits

Author SHA1 Message Date
Petr Rockai
8e9da71c32 Keep the testsuite stats correct in spite of failed-test repetition. 2010-04-07 09:41:33 +00:00
Petr Rockai
13deb51d3e Move a fragile testcase toward the end of t-mirror-lvconvert.sh. 2010-04-06 23:04:45 +00:00
Petr Rockai
2c9ffffdca Put back the `lvconvert -m+1 --mirrorlog disk' test in t-lvconvert-mirror.sh. 2010-04-06 22:22:26 +00:00
Alasdair Kergon
13a9bce647 disable another broken check in a test 2010-04-06 18:13:43 +00:00
Alasdair Kergon
dbb3cfe05e Fix is_partitioned_dev not to attempt to reopen device. 2010-04-06 17:36:41 +00:00
Alasdair Kergon
674baa8143 Disable broken test. 2010-04-06 16:30:53 +00:00
Christine Caulfield
db482f3e1c Fix a thread race in clvmd that could cause lockups on very busy systems 2010-04-06 15:29:30 +00:00
Alasdair Kergon
6a5a0222d7 Display PVs created during tests 2010-04-06 14:25:07 +00:00
Zdenek Kabelac
4512267bf1 Using 'not' if the test 'should' fail. 2010-04-06 14:24:13 +00:00
Dave Wysochanski
54555a6fab Update WHATS_NEW 2010-04-06 14:07:11 +00:00
Dave Wysochanski
ae2353caf8 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>
2010-04-06 14:04:54 +00:00
Dave Wysochanski
4eae19ed75 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>
2010-04-06 14:04:20 +00:00
Dave Wysochanski
e6ec837203 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>
2010-04-06 14:04:03 +00:00
Dave Wysochanski
b37f7c4b7b 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>
2010-04-06 14:03:43 +00:00
Zdenek Kabelac
4b8340327c 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).
2010-04-06 11:53:53 +00:00
Zdenek Kabelac
92e4442d4a 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*.
2010-04-06 09:54:11 +00:00
Zdenek Kabelac
2517f9adf2 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.
2010-04-06 09:50:07 +00:00
Alasdair Kergon
9bad64ff72 remove compiler warning 2010-04-02 01:35:34 +00:00
Alasdair Kergon
d1b147e2bb A few more log_error to log_warn changes for mirrors. 2010-04-01 14:54:37 +00:00
Zdenek Kabelac
1b7730c76a Better debug message for Un/Locked memory size. 2010-04-01 14:53:47 +00:00
Alasdair Kergon
28801f7470 temporarily downgrade the 'open while suspended' error till we fix it properly 2010-04-01 14:30:51 +00:00
Alasdair Kergon
f4c43c11c9 Try to fix tracking of whether or not log extents need allocating. 2010-04-01 13:58:13 +00:00
Zdenek Kabelac
fde4a8e1b5 Set ret value to success initially. 2010-04-01 13:43:12 +00:00
Alasdair Kergon
abb193533c Avoid endless loop if lv->segments list is corrupted 2010-04-01 13:08:06 +00:00
Alasdair Kergon
775fac97d3 initialise log_allocated to 0 2010-04-01 12:29:07 +00:00
Alasdair Kergon
3963c01760 Limit number of error messages when checking LV segments. 2010-04-01 12:14:20 +00:00
Alasdair Kergon
1e01a63685 Improve vg_validate to detect some loops in lists. 2010-04-01 11:45:36 +00:00
Alasdair Kergon
235ca704b1 Improve vg_validate to detect some loops in lists. 2010-04-01 11:43:24 +00:00
Alasdair Kergon
5685ba7918 Change most remaining log_error WARNING messages to log_warn. 2010-04-01 10:34:09 +00:00
Petr Rockai
f0d1c085b9 Do not pass NULL to setenv in the test harness. 2010-03-31 23:11:12 +00:00
Zdenek Kabelac
45490081c7 Missed to convert T -> SCRIPTS 2010-03-31 23:05:20 +00:00
Petr Rockai
a3503d13e5 Re-run failing tests with log/verbose=4 (-vvvv) to help with debugging. 2010-03-31 22:18:17 +00:00
Alasdair Kergon
3ed4d07d3a remove unused var 2010-03-31 20:39:51 +00:00
Alasdair Kergon
06e0023c2c Attempt to fix non-ALLOC_ANYWHERE allocation code after recent changes broke
The preference given to the PVs with the largest free areas.
2010-03-31 20:26:04 +00:00
Milan Broz
b22e0a3ecb 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.)
2010-03-31 17:23:56 +00:00
Milan Broz
0802006ea7 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).
2010-03-31 17:23:18 +00:00
Milan Broz
29a21d1627 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).
2010-03-31 17:22:26 +00:00
Milan Broz
a0074aa07e 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:-)
2010-03-31 17:21:40 +00:00
Milan Broz
4e8859d851 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).
2010-03-31 17:20:44 +00:00
Milan Broz
562ae607d2 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.
2010-03-31 17:20:02 +00:00
Mikulas Patocka
2426656b07 A missing space in the error message.
Add missing parentheses to an error message

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2010-03-31 12:06:30 +00:00
Mikulas Patocka
898d3c655d 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>
2010-03-31 12:01:49 +00:00
Zdenek Kabelac
855e554051 Update for make install. 2010-03-31 07:43:41 +00:00
Zdenek Kabelac
4aac2c543b Install generated 10-dm.rules from builddir.
Patch just check whether file is generated in builddir otherwise srcdir file
is used.
2010-03-31 07:40:20 +00:00
Zdenek Kabelac
78024e7be6 Use .commands created in builddir for symlink installation. 2010-03-31 07:37:16 +00:00
Jonathan Earl Brassow
18f0009a41 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.
2010-03-31 03:56:25 +00:00
Jonathan Earl Brassow
1cf64de2bf 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.)
2010-03-31 02:36:03 +00:00
Zdenek Kabelac
b1d6be8ec6 Update for dmeventd changes. 2010-03-30 14:44:57 +00:00
Zdenek Kabelac
137a25906d Count only readable size for memlock stats.
As we mlock() only readable pages, makes statistics only
for readable bytes.
2010-03-30 14:41:58 +00:00
Zdenek Kabelac
2b298cbb32 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().
2010-03-30 14:41:23 +00:00