1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

4245 Commits

Author SHA1 Message Date
Zdenek Kabelac
b7be589ed0 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.
2010-03-29 14:17:59 +00:00
Zdenek Kabelac
b41f5924bf 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.
2010-03-29 14:11:17 +00:00
Zdenek Kabelac
1a91d0914e 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.
2010-03-29 14:09:25 +00:00
Zdenek Kabelac
08db4eeb51 Use $(top_srcdir) for sources and add cscope.out to distclean targets. 2010-03-29 14:07:56 +00:00
Zdenek Kabelac
24bf45e606 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.
2010-03-29 14:07:01 +00:00
Zdenek Kabelac
a6fd031927 Avoid hard sed replacement - i.e. quick test change in make.tmpl
could avoid recofiguration steps in same debug cases.
2010-03-29 14:06:06 +00:00
Zdenek Kabelac
2384a25499 Fixing compilation warning: implicit declaration of function ‘umask’ 2010-03-29 14:05:17 +00:00
Petr Rockai
5a4760792f When a scsi_debug modprobe fails, skip the test instead of failing it. 2010-03-28 15:52:04 +00:00
Jonathan Earl Brassow
7a369d3704 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.
2010-03-26 22:15:43 +00:00
Mike Snitzer
217cb1aa84 Use a real socket for singlenode clvmd to fix clvmd's high cpu load. 2010-03-26 15:45:36 +00:00
Mike Snitzer
7b0f529d3e 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
2010-03-26 15:40:13 +00:00
Zdenek Kabelac
d20956dcb1 Updates .so links for plugins 2010-03-26 13:21:28 +00:00
Alasdair Kergon
2abbc07f3c Allow ALLOC_ANYWHERE to split contiguous areas. 2010-03-25 21:19:26 +00:00
Alasdair Kergon
8ca4d4436d . 2010-03-25 18:22:39 +00:00
Alasdair Kergon
b8175c33da Use INTERNAL_ERROR definition consistently in internal error messages. 2010-03-25 18:22:04 +00:00
Alasdair Kergon
a7ca334681 Add some assertions to allocation code. 2010-03-25 18:16:54 +00:00
Alasdair Kergon
0aae84f9a2 more diagnostics 2010-03-25 12:16:17 +00:00
Alasdair Kergon
dc49eeb6a3 more diagnostics 2010-03-25 12:14:14 +00:00
Alasdair Kergon
c1a3bffdae add debug mesg 2010-03-25 11:57:16 +00:00
Alasdair Kergon
86ef0fc9dd . 2010-03-25 11:48:54 +00:00
Alasdair Kergon
1239365201 add debug mesgs and attempt to control which device is used for log as perhaps intended 2010-03-25 11:47:00 +00:00
Alasdair Kergon
a570dca703 add debug output and attempt to control which device gets log as intended perhaps 2010-03-25 11:42:17 +00:00
Alasdair Kergon
f4cea344b1 improve a few comments in last check-in 2010-03-25 02:40:09 +00:00
Alasdair Kergon
8d6722c8ad 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.
2010-03-25 02:31:48 +00:00
Mike Snitzer
4c42d18e0c Revert having clvmd consult the lvm.conf "activation/monitoring".
Correctly implementing the intent of this change requires more
analysis.
2010-03-24 22:25:11 +00:00
Zdenek Kabelac
08ebb57c9b Move declaration of struct dm_info info to declaration block. 2010-03-24 11:36:48 +00:00
Mike Snitzer
a6bc975a24 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>
2010-03-23 22:30:18 +00:00
Petr Rockai
a2b6bbdfb2 Also honour abort_on_internal_errors when log_fn is set. 2010-03-23 18:18:49 +00:00
Peter Rajnoha
310efa7b96 UDEV_SYNC_SUPPORT, not UDEV_SYNC! 2010-03-23 15:13:03 +00:00
Alasdair Kergon
36f9d53b60 Allow dynamic extension of array of areas selected as allocation candidates. 2010-03-23 15:07:55 +00:00
Peter Rajnoha
2e08dbcb65 Export and use only valid cookie value in test suite. 2010-03-23 14:47:35 +00:00
Peter Rajnoha
5161ecb98d Autoreconf.
(Strictly require libudev if udev_sync is used)
2010-03-23 14:44:42 +00:00
Peter Rajnoha
91345610f8 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.
2010-03-23 14:43:18 +00:00
Peter Rajnoha
ac3691f70e 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.
2010-03-23 14:38:37 +00:00
Alasdair Kergon
8b373275a2 Avoid duplicate definitions. 2010-03-23 14:35:08 +00:00
Zdenek Kabelac
7b45e46aa3 Remove const modifier for struct volume_group* from process_each_lv_in_vg().
Content of this pointer is not const during this function.
2010-03-23 14:24:04 +00:00
Mike Snitzer
fd817ff34a 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*).
2010-03-20 03:44:04 +00:00
Alasdair Kergon
94ff21b4f1 Fix libdevmapper-event pkgconfig version string to match libdevmapper. 2010-03-19 18:33:55 +00:00
Dave Wysochanski
0699572d23 Update WHATS_NEW for last checkin. 2010-03-18 17:32:25 +00:00
Dave Wysochanski
15fdc8d3ee 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>
2010-03-18 17:29:12 +00:00
Alasdair Kergon
1091650a79 autoreconf & add missing WHATS_NEW entry 2010-03-18 13:24:35 +00:00
Petr Rockai
c7ee154ba9 Run both locking_type 1 and 3 tests (forgot to uncomment locking_type 1 before
last checkin).
2010-03-18 09:28:42 +00:00
Petr Rockai
e2e67c87f5 Skip locking_type 3 tests instead of failing when system-wide clvmd is running. 2010-03-18 09:27:39 +00:00
Petr Rockai
649c45078f Add infrastructure for running the functional testsuite with locking_type set
to 3, using a local (singlenode) clvmd.
2010-03-18 09:19:30 +00:00
Dave Wysochanski
a09aa49783 Add pvchange -u --all to testsuite.
This can be an interesting test case when using PVs with --metadatacopies 0.
2010-03-17 17:02:01 +00:00
Mike Snitzer
d0af5def87 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).
2010-03-17 14:55:28 +00:00
Milan Broz
917c57e77b 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.)
2010-03-17 14:45:28 +00:00
Milan Broz
acb4b5e4de 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.)
2010-03-17 14:44:18 +00:00
Alasdair Kergon
0a5182fc97 Suppress repeated errors about the same missing PV uuids.
Bypass full device scans when using internally-cached VG metadata.
2010-03-17 02:11:18 +00:00
Alasdair Kergon
f168869702 fix last checkin 2010-03-16 19:06:57 +00:00