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

4347 Commits

Author SHA1 Message Date
Milan Broz
453bab220b Fix return code of info callbacks.
In dev_manager_info 0 means error and 1 info is returned,
not that device exists (that value is part of info struct).

Fix query by uuid only (no name) which returns 0 when device
does not exist.
2010-01-26 07:58:23 +00:00
Alasdair Kergon
448f8c4240 pre-release 2010-01-23 02:14:30 +00:00
Mike Snitzer
5a414c6ad1 Default to checking LV's progress before waiting in _wait_for_single_lv.
Support "wait before testing" using '+' in pvmove and lvconvert
interval.  Doing so overrides the new default of sleeping after checking
the LV's progress.

Sleeping before checking progress can lead to extraneous polldaemons
being left running.  These polldaemons would have otherwise exited had
they checked before sleeping.  Checking progress before sleeping helps
workaround the subtly unreliable nature of "finished" state checking
in _percent_run.

Update test/t-mirror-names.sh to use '+' when providing its lvconvert
interval.
2010-01-22 21:59:42 +00:00
Jonathan Earl Brassow
65a942f01f a little more information for the cmirrord man page 2010-01-22 21:48:17 +00:00
Milan Broz
6df32fed62 Fix syntax error in cmirror init script
- break cannot be used here
 - remove CLVMDOPTS
 - add echo to stop call
2010-01-22 16:19:38 +00:00
Mike Snitzer
1199b48cd7 Eliminate extra ioctls just to check open_count in _add_new_lv_to_dtree.
DM >= 4.7.0 always returns open_count so just use the associated nodes'
existing info.

Introduce _cached_info() to get an LV's cached info.
2010-01-22 15:40:31 +00:00
Milan Broz
c493f56e1b Document undocumented commits which fixed some bugs.
Go WHATS_NEW!
2010-01-22 14:33:33 +00:00
Mike Snitzer
2e65b8ce5f Removed inactive_table check from _lv_has_target_type. This check
doesn't offer any benefit (that I can recall) and testing validates
that.
2010-01-22 13:28:54 +00:00
Milan Broz
42a6d954d3 Switch memory debugging off for now if compiled with dmeventd,
functions are not thread-safe in debug mode.
2010-01-22 13:20:32 +00:00
Milan Broz
8f73b4c3ae Fix syslog prefix in the first message (dmeventd->lvm). 2010-01-22 12:48:58 +00:00
Milan Broz
adcd06fccb Fix exported symbols for lvm2 dmeventd wrapper. 2010-01-22 12:38:16 +00:00
Milan Broz
c40380f72a Move error message to locking constructor and print
more descriptive message if locking fails instead of
"Locking type -1 initialisation failed."

Use read-only locking instead of misleading ignorelocking option
in message.
2010-01-22 09:45:29 +00:00
Alasdair Kergon
8e44e884a2 post-release 2010-01-22 01:09:09 +00:00
Alasdair Kergon
e2368be912 missing header 2010-01-22 00:43:28 +00:00
Alasdair Kergon
7986fd4db7 fix lib include 2010-01-22 00:18:37 +00:00
Alasdair Kergon
6107f4a02a pre-release 2010-01-21 23:55:17 +00:00
Alasdair Kergon
2ce63814e9 Add libdevmapper-event-lvm2.so to serialise dmeventd plugin liblvm2cmd use. 2010-01-21 22:15:45 +00:00
Dave Wysochanski
8ba508f8f7 Call _alloc_pv() inside _pv_read() and clean up error paths.
We should be consistent with pv constructors so call _alloc_pv()
here as we do from pv_create().
2010-01-21 21:09:23 +00:00
Dave Wysochanski
2100490424 Remove useless memory allocation for pv->vg_name in _alloc_pv().
All this seems to do is provide a memory leak so remove it.
The only caller of _alloc_pv() later explicitly sets
pv->vg_name = fmt->orphan_vg_name so clearly this allocation
should be removed.  I also saw no where in the code where
strncpy was used to assign pv->vg_name - only direct assignments
and strdup's.
2010-01-21 21:04:44 +00:00
Dave Wysochanski
7e7639e39a Correct 'void *' usage in pvcreate_single.
Remove needless cast.
2010-01-21 21:04:20 +00:00
zkabelac
3555d0ecd5 Log entry for the last lvmcmdline.c commit 2010-01-21 17:14:18 +00:00
zkabelac
ecb9a01cfa Reset released pointer and counters.
DSO is currently not dl_close-ing pluing during it is unregister handling,
so clear structure and related counter, so there are no memory problems.
Futher fixes are needed.
2010-01-21 13:41:39 +00:00
Mike Snitzer
ca352ebfba Preload the origin prior to suspend IFF snapshot(s) still exist after a
merge completes.  This narrows the scope of this "hack" (which still
needs a proper fix within the deptree).

This stops dmeventd from trying to access snapshot devices that were
already removed.
2010-01-20 21:53:10 +00:00
Jonathan Earl Brassow
29c73eb67b Fill in a little more on the man page for cmirrord 2010-01-20 15:17:25 +00:00
Alasdair Kergon
2a598ff24d Deal with a few more compiler warnings. 2010-01-20 02:43:19 +00:00
Mike Snitzer
f6d5837e5e Add t-topology-support.sh and t-snapshot-merge.sh tests. 2010-01-19 23:02:04 +00:00
Mike Snitzer
dac8cee72c add test/t-snapshot-merge.sh to provide coverage of snapshot-merge support 2010-01-19 22:55:00 +00:00
Alasdair Kergon
e01a2f8324 Remove mknod() and add FIXMEs.
In the udev-world, this function should work differently.
2010-01-19 18:21:03 +00:00
Alasdair Kergon
a092ccb82b remove more compiler warnings
add FIXMEs for incomplete write()s
2010-01-19 17:24:29 +00:00
Mike Snitzer
e894d07b92 test/t-topology-support.sh requires scsi_debug from >= 2.6.31 2010-01-19 17:06:50 +00:00
Alasdair Kergon
befef6eb00 remove no-longer-used header 2010-01-19 17:04:05 +00:00
Alasdair Kergon
162224979d remove no-longer-used files 2010-01-19 17:01:17 +00:00
Mike Snitzer
a90f6e2dda Add a common way to establish a scsi_debug-based 4K drive for use by an
LVM2 test (rather than using the traditional loop device).

prepare_scsi_debug_dev currently assumes exclussive access to the
scsi_debug module.  Any script that tries to use prepare_scsi_debug_dev
when scsi_debug is unavailable or already loaded into the kernel will be
skipped.

t-topology-support.sh shows how prepare_scsi_debug_dev function can be
used repeatedly (within a script) to test LVM2 ontop of a ramdisk-based
SCSI device w/ arbitrary scsi_debug features.
2010-01-19 16:44:57 +00:00
Mike Snitzer
e449bfd741 update test/t-pvcreate-operation-md.sh attempt loading raid0.ko if raid0
isn't already available (in /proc/mdstat).

switch to requiring 2.6.33 for the alignment_offset tests; 2.6.{31,32}
alignment_offset values aren't reliable.  2.6.33 _should_ have mkp's
alignment_offset fixes but so far it doesn't (as of 2.6.33-rc4).
2010-01-19 15:59:34 +00:00
Alasdair Kergon
8ecc1eb99d Signal handling FIXMEs.
A few integer type changes.
2010-01-19 15:58:45 +00:00
Milan Broz
1fb910411e Never scan suspended devices in clvmd.
For mirror repair (and similar tasks) it can happen that full
device rescan is issued from clvmd.

Because code can be in the middle of repair (calling suspend)
clvmd should never try to scan suspended devices
(otherwise it causes deadlock).

Also code must not change ignore_suspended_device flag when
doing refresh_filters (called from lvmcache scan code).
2010-01-19 13:25:00 +00:00
Alasdair Kergon
3141b86d01 And more fixes for cmirror build. 2010-01-19 02:04:33 +00:00
Alasdair Kergon
f8ff64c87e more build fixes 2010-01-19 01:10:46 +00:00
Alasdair Kergon
c71b834aad Clean up include files. 2010-01-18 21:07:24 +00:00
Jonathan Earl Brassow
a78e7d0287 Fix some compiler warnings. 2010-01-18 20:58:50 +00:00
Alasdair Kergon
09cf0fe6b9 Misc compilation clean-ups. 2010-01-18 20:08:44 +00:00
Mike Snitzer
13713bc147 Change dev_manager_mirror_percent()'s 'struct logical_volume *' to be
'const'.  Be consistent with its use (and dev_manager_snapshot_percent()).

Pass 'lv' from dev_manager_snapshot_percent() to _percent() to
_percent_run().  _percent_run() always dereferenced 'lv' (when
initializing segh) even though it may have been NULL (as was the case
until now for dev_manager_snapshot_percent()).

If a "snapshot-origin" LV (snapshot-merge whose merge was deferred
becuase it was open) was passed to _percent_run() it would always return
100%.

Update _percent_run() to NOT return PERCENT_100 et. al. if
->target_percent() wasn't ever called and supplied 'lv' is a merging
origin.  A default return of 100% does not work for snapshot-merge.

Also tweak a related lvconvert log_error() to include "Aborting merge."
2010-01-15 22:58:25 +00:00
Jonathan Earl Brassow
9c17cf4edf Use tabs, not spaces. 2010-01-15 21:48:03 +00:00
Jonathan Earl Brassow
938b25b986 Initial version of the cmirrord init script
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
2010-01-15 20:47:52 +00:00
Jonathan Earl Brassow
040b76f1e6 initial cmirrord man page
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
2010-01-15 20:24:04 +00:00
Jonathan Earl Brassow
66226207ce Make the intermachine communication structures architecture independant
to allow for mixed architecture clusters.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
2010-01-15 19:49:35 +00:00
Jonathan Earl Brassow
999b4168c1 When moving the cluster log server into the LVM tree, the in memory
bitmap tracking was switched from the e2fsprogs implementation to
the device-mapper implementation (dm_bitset_t).  The latter has a
leading uin32_t field designed to hold the number of bits that are
being tracked.  The code was not properly handling this change in
all places.  Specifically, when getting the bitmap to/from disk.

Endian adjustments will likely need to be made on the accounting
field as well, since bitmaps are passed between machines on
start-up.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
2010-01-15 18:48:24 +00:00
Mike Snitzer
9bfc452487 Detect case of both merging_store and cow_store supplied in
_snap_text_import().
2010-01-15 17:46:08 +00:00
Mike Snitzer
df675ed9fb Improve target type compatibility checking in _percent_run().
Add 'target_status_compatible' method to 'struct segtype_handler'.
2010-01-15 16:35:26 +00:00
Jonathan Earl Brassow
4a13ae4c95 udpate WHATS_NEW* 2010-01-15 16:18:14 +00:00