]> sourceware.org Git - lvm2.git/log
lvm2.git
13 years agoChange pvresize code to work with new metadata handling interface and allow
Peter Rajnoha [Mon, 21 Feb 2011 12:27:26 +0000 (12:27 +0000)]
Change pvresize code to work with new metadata handling interface and allow
resizing a PV with two metadata areas.

13 years agoChange pv_write code to work with the changes in metadata handling interface
Peter Rajnoha [Mon, 21 Feb 2011 12:26:27 +0000 (12:26 +0000)]
Change pv_write code to work with the changes in metadata handling interface
and changes in format_instance.

13 years agoRemove unused _mda_setup fn. This functionality is covered by new pv_add_metadata_are...
Peter Rajnoha [Mon, 21 Feb 2011 12:25:16 +0000 (12:25 +0000)]
Remove unused _mda_setup fn. This functionality is covered by new pv_add_metadata_area fn.

13 years agoChange the code throughout to use new pv_initialise and modified pv_setup fn.
Peter Rajnoha [Mon, 21 Feb 2011 12:24:15 +0000 (12:24 +0000)]
Change the code throughout to use new pv_initialise and modified pv_setup fn.
Change pv_create code to work with these changes together with using new
pv_add_metadata_area fn to add metadata areas for a PV being created.

13 years agoSeparate new pv_initialise function out of the original pv_setup code.
Peter Rajnoha [Mon, 21 Feb 2011 12:20:18 +0000 (12:20 +0000)]
Separate new pv_initialise function out of the original pv_setup code.

pv_initiliase initialises a new PV
pv_setup sets up an existing PV with a VG

13 years agoAdd new pv_remove_metadata_area interface function.
Peter Rajnoha [Mon, 21 Feb 2011 12:17:54 +0000 (12:17 +0000)]
Add new pv_remove_metadata_area interface function.

13 years agoAdd new pv_add_metadata_area interface function.
Peter Rajnoha [Mon, 21 Feb 2011 12:17:26 +0000 (12:17 +0000)]
Add new pv_add_metadata_area interface function.

13 years agoRemove useless mdas parameter for pv_read (from now on, we store mdas in a
Peter Rajnoha [Mon, 21 Feb 2011 12:15:59 +0000 (12:15 +0000)]
Remove useless mdas parameter for pv_read (from now on, we store mdas in a
format instance)

13 years agoAdd format instance support for pv_read code.
Peter Rajnoha [Mon, 21 Feb 2011 12:13:40 +0000 (12:13 +0000)]
Add format instance support for pv_read code.

13 years agoInitialise a new PV-based format instance for a PV that is being created.
Peter Rajnoha [Mon, 21 Feb 2011 12:12:32 +0000 (12:12 +0000)]
Initialise a new PV-based format instance for a PV that is being created.

13 years agoAdd vg_set_fid function to change VG format instance.
Peter Rajnoha [Mon, 21 Feb 2011 12:10:58 +0000 (12:10 +0000)]
Add vg_set_fid function to change VG format instance.

This function also sets a reference to a new VG format instance for all PVs
that are part of the VG so the PV-VG interconnection is consistent after the
change.

13 years agoChange the code throughout for recent changes in format_instance handling.
Peter Rajnoha [Mon, 21 Feb 2011 12:07:03 +0000 (12:07 +0000)]
Change the code throughout for recent changes in format_instance handling.

13 years agoChange create_instance to create PV-based as well as VG-based format instances.
Peter Rajnoha [Mon, 21 Feb 2011 12:05:49 +0000 (12:05 +0000)]
Change create_instance to create PV-based as well as VG-based format instances.
Add supporting functions to work with the format instance and metadata area
structures stored within the format instance. Add support for simple indexing
of metadata areas using PV id and mda order (for on-disk PV only for now, we
can extend the indexing even for other mdas if needed - we only need to define
a proper key for the index).

13 years agoChange and generalise struct format_instance for PV and VG use.
Peter Rajnoha [Mon, 21 Feb 2011 12:01:22 +0000 (12:01 +0000)]
Change and generalise struct format_instance for PV and VG use.

13 years agoHandle decimal digits with --units instead of ignoring them silently.
Alasdair Kergon [Fri, 18 Feb 2011 23:09:55 +0000 (23:09 +0000)]
Handle decimal digits with --units instead of ignoring them silently.
Fix remaining warnings and compile with -Wpointer-arith.

13 years agoFix gcc warnings for unused variables
Zdenek Kabelac [Fri, 18 Feb 2011 16:17:56 +0000 (16:17 +0000)]
Fix gcc warnings for unused variables

Put dead assigment code into comment.

13 years agoAdd debug message for open_count failure
Zdenek Kabelac [Fri, 18 Feb 2011 16:13:56 +0000 (16:13 +0000)]
Add debug message for open_count failure

Report  open_count problem as debug.

Function using _node_has_closed_parents decides whether
it's error or could be ignored.

13 years agoUse return_0 to get bactrace
Zdenek Kabelac [Fri, 18 Feb 2011 15:05:40 +0000 (15:05 +0000)]
Use return_0 to get bactrace

13 years agoAdd some backtraces for error paths in process_each_lv
Zdenek Kabelac [Fri, 18 Feb 2011 15:02:25 +0000 (15:02 +0000)]
Add some backtraces for error paths in process_each_lv

13 years agoMemory unlock allows 1 page difference
Zdenek Kabelac [Fri, 18 Feb 2011 14:51:04 +0000 (14:51 +0000)]
Memory unlock allows 1 page difference

As the kernel seems to be doing weird things during
mlock -> munlock -  allow 1 page locking difference without
warning - and log just debug message for a 1 page difference.

Allocation happens outside critical section probably during
log_warn printing.

Should make tests passing for now.

13 years agoConst fixing
Zdenek Kabelac [Fri, 18 Feb 2011 14:47:28 +0000 (14:47 +0000)]
Const fixing

Fixing some const warnings - with API change in:

int vg_extend(struct volume_group *vg, int pv_count, const char *const *pv_names,

Change is needed - as lvm2api expects const behaviour here.
So vg_extend() is doing local strdup for unescaping.

skip_dev_dir return const char* from const char* vg_name.

Rest of the patch is cleanup of related warnings.

Also using dm_report_filed_string() API change to simplify
casting in _string_disp and _lvname_disp.

13 years agoAPI change - support more const arg
Zdenek Kabelac [Fri, 18 Feb 2011 14:38:47 +0000 (14:38 +0000)]
API change - support more const arg

As dm_report_field_string() doesn't modify content of data pointer,
it can be marked as const.

It's slight API change - but doesn't require any change on the user side
and supports wider range of arguments without const casting.
(i.e. we may use as paramater const lv struct this way:  &lv->name)

13 years agoVoid* arithmetic replaced with char*
Zdenek Kabelac [Fri, 18 Feb 2011 14:34:41 +0000 (14:34 +0000)]
Void* arithmetic replaced with char*

13 years agoFix !DEVMAPPER_SUPPORT build
Zdenek Kabelac [Fri, 18 Feb 2011 14:29:39 +0000 (14:29 +0000)]
Fix !DEVMAPPER_SUPPORT build

Fix build when devmapper is disabled.

13 years agoRemove fs_unlock after failed suspend
Zdenek Kabelac [Fri, 18 Feb 2011 14:26:31 +0000 (14:26 +0000)]
Remove fs_unlock after failed suspend

Explicit fs_unlock() after failed suspend is not need -
as it will happen automatically with nearest lv_info()
or vg_unlock().

13 years agoCritical section
Zdenek Kabelac [Fri, 18 Feb 2011 14:16:11 +0000 (14:16 +0000)]
Critical section

New strategy for memory locking to decrease the number of call to
to un/lock memory when processing critical lvm functions.

Introducing functions for critical section.

Inside the critical section - memory is always locked.
When leaving the critical section, the memory stays locked
until memlock_unlock() is called - this happens with
sync_local_dev_names() and sync_dev_names() function call.

memlock_reset() is needed to reset locking numbers after fork
(polldaemon).

The patch itself is mostly rename:

memlock_inc  -> critical_section_inc
memlock_dec  -> critical_section_dec
memlock      -> critical_section

Daemons (clmvd, dmevent) are using memlock_daemon_inc&dec
(mlockall()) thus they will never release or relock memory they've
already locked memory.

Macros sync_local_dev_names() and sync_dev_names() are functions.
It's better for debugging - and also we do not need to add memlock.h
to locking.h header (for memlock_unlock() prototyp).

13 years agoReplace PV_MIN_SIZE with function pv_min_size()
Zdenek Kabelac [Fri, 18 Feb 2011 14:11:22 +0000 (14:11 +0000)]
Replace PV_MIN_SIZE with function pv_min_size()

Add configurable option to define minimal size of
of block device usable as a PV.

pv_min_size() is added to lvm-globals and it's being
initialized through _process_config.

Macro PV_MIN_SIZE is unused and removed.

New define DEFAULT_PV_MIN_SIZE_KB is added to lvm-global
and unlike PV_MIN_SIZE it uses KB units.

Should help users with various slow devices attached to the system,
which cannot be easily filtered out (like FDD on /dev/sdX):
https://bugzilla.redhat.com/show_bug.cgi?id=644578

13 years agoSupport 64bit ints in config
Zdenek Kabelac [Fri, 18 Feb 2011 14:08:22 +0000 (14:08 +0000)]
Support 64bit ints in config

13 years agoFix for bug 677739: removing final exclusive cmirror snapshot,
Jonathan Earl Brassow [Fri, 18 Feb 2011 00:36:04 +0000 (00:36 +0000)]
Fix for bug 677739: removing final exclusive cmirror snapshot,
                    results in clvmd deadlock

When a logical volume is activated exclusively in a cluster, the
local (non-cluster-aware) target is used.  However, when creating
a snapshot on the exclusive LV, the resulting suspend/resume fails
to load the appropriate device-mapper table - instead loading the
cluster-aware target.

This patch adds an 'exclusive' parameter to the pertinent resume
functions to allow for the right target type to be loaded.

13 years agoFix an lv_postorder bug where it failed to clear temporary flags, making it
Petr Rockai [Mon, 14 Feb 2011 19:27:05 +0000 (19:27 +0000)]
Fix an lv_postorder bug where it failed to clear temporary flags, making it
impossible to use twice with the same LV(s). Discovered by Milan.

13 years agoAvoid flooding syslog with redundant messages when a snapshot is invalidated
Petr Rockai [Mon, 14 Feb 2011 14:26:36 +0000 (14:26 +0000)]
Avoid flooding syslog with redundant messages when a snapshot is invalidated
(reported by Corey).

13 years agobug 659264: more examples for pvmove
Jonathan Earl Brassow [Wed, 9 Feb 2011 22:24:55 +0000 (22:24 +0000)]
bug 659264: more examples for pvmove

13 years agoAllow overriding the DM_DEV_DIR used by the test suite (fixes BZ 672796). Use
Petr Rockai [Wed, 9 Feb 2011 17:57:14 +0000 (17:57 +0000)]
Allow overriding the DM_DEV_DIR used by the test suite (fixes BZ 672796). Use
like this:

# LVM_TEST_DEVDIR=/tmp/dev make check

13 years agoFix a typo in pvmove.8 (fixes BZ 673618, spotted by John Bradshaw).
Petr Rockai [Wed, 9 Feb 2011 17:42:15 +0000 (17:42 +0000)]
Fix a typo in pvmove.8 (fixes BZ 673618, spotted by John Bradshaw).

13 years agopost-release
Alasdair Kergon [Wed, 9 Feb 2011 12:11:21 +0000 (12:11 +0000)]
post-release

13 years agopre-release
Alasdair Kergon [Wed, 9 Feb 2011 12:04:39 +0000 (12:04 +0000)]
pre-release

13 years agoorginal WHATS_NEW entry was changed to be less in-line with change it
Jonathan Earl Brassow [Tue, 8 Feb 2011 22:35:11 +0000 (22:35 +0000)]
orginal WHATS_NEW entry was changed to be less in-line with change it
was associated with.  Update entry to be clearer than both.

13 years agoRevert DEBUG_MEM cleanup commit
Zdenek Kabelac [Tue, 8 Feb 2011 15:52:00 +0000 (15:52 +0000)]
Revert DEBUG_MEM cleanup commit

As functions compiled within this define are apparently stil part of the public API,
(though lvm2 code is never using them unless this define is used for compilation),
keep functions available in the code for now -> revert.

13 years agoFix CRC32 calculation on big endian CPU
Zdenek Kabelac [Tue, 8 Feb 2011 12:41:08 +0000 (12:41 +0000)]
Fix CRC32 calculation on big endian CPU

Fix regresion from 2.02.75 speedup - so currently crc32 is a little bit
more complicated on big-endian CPU as the uint32_t needs to be shifted
on here.

13 years agopost-release
Alasdair Kergon [Fri, 4 Feb 2011 22:46:18 +0000 (22:46 +0000)]
post-release

13 years agopre-release
Alasdair Kergon [Fri, 4 Feb 2011 22:35:29 +0000 (22:35 +0000)]
pre-release

13 years agoAdd configure option --with-device-nodes-on
Zdenek Kabelac [Fri, 4 Feb 2011 22:17:54 +0000 (22:17 +0000)]
Add configure option --with-device-nodes-on

Make configurable default behaviour how to deal with device node creates.
With udev system natural options should be  'resume'.
For older systems where user expect there is node in /dev/mapper immediately
after  dmsetup create --notable  -  use 'create'

FIXME:
Code needs fixing passing this flag through udev cookie.

13 years agopre-release
Alasdair Kergon [Fri, 4 Feb 2011 22:07:43 +0000 (22:07 +0000)]
pre-release

13 years agoWarn if secure data flag requested but not supported by kernel.
Alasdair Kergon [Fri, 4 Feb 2011 21:26:33 +0000 (21:26 +0000)]
Warn if secure data flag requested but not supported by kernel.

13 years agoPlace back some common options
Zdenek Kabelac [Fri, 4 Feb 2011 21:19:03 +0000 (21:19 +0000)]
Place back some common options

Until man pages are generated keep some common options with all commands.

13 years agoAllow snapshots in a cluster as long as they are exclusively
Jonathan Earl Brassow [Fri, 4 Feb 2011 20:30:17 +0000 (20:30 +0000)]
Allow snapshots in a cluster as long as they are exclusively
activated.

In order to achieve this, we need to be able to query whether
the origin is active exclusively (a condition of being able to
add an exclusive snapshot).

Once we are able to query the exclusive activation of an LV, we
can safely create/activate the snapshot.

A change to 'hold_lock' was also made so that a request to aquire
a WRITE lock did not replace an EX lock, which is already a form
of write lock.

13 years agoAdd --addnodeonresume, --addnodeoncreate
Zdenek Kabelac [Fri, 4 Feb 2011 19:33:53 +0000 (19:33 +0000)]
Add --addnodeonresume, --addnodeoncreate

Add new function dm_task_set_add_node() to select between 2 types
of node creation in device directory.

DM_ADD_NODE_ON_RESUME is now default and ensures node is created on
resume. Old original behavior is accessible with DM_ADD_NODE_ON_CREATE.
In this case node would be created during dmsetup create --notable.

For the user 2 new options for dmsetup create are added:
[{--addnodeonresume | --addnodeoncreate }]

Properly working node creation on resume is needed for proper operation
stacking and ability to correctly check in which state the device should
after whole udev transation.

13 years agoRemove extra sync calls.
Zdenek Kabelac [Fri, 4 Feb 2011 19:21:47 +0000 (19:21 +0000)]
Remove extra sync calls.

Remove temporaly added fs_unlock() calls to fix clmvd usablity.
Now when the message passing is properly working - they are no longer needed.
Simplify no_locking  check for VG unlock - as message is always send
for all targets - clustered & non-clustered.

13 years agoUse cluster-wide message to request device name sync
Zdenek Kabelac [Fri, 4 Feb 2011 19:18:16 +0000 (19:18 +0000)]
Use cluster-wide message to request device name sync

Thanks to CLVMD_CMD_SYNC_NAMES propagation fix the message passing started
to work. So starts to send a message before the VG is unlocked.
Removing also implicit sync in VG unlock from clmvd as now the message
is delievered and processed in do_command().
Also add support for this new message into external locking
and mask this event from further processing.

13 years agoFix operation node stacking for consecutive dm ops
Zdenek Kabelac [Fri, 4 Feb 2011 19:14:39 +0000 (19:14 +0000)]
Fix operation node stacking for consecutive dm ops

With the ability to stack many operations in one udev transaction -
in same cases we are adding and removing same device at the same time
(i.e. deactivate followed by activate).

This leads to a problem of checking stacked operations:
i.e. remove /dev/node1 followed by create /dev/node1

If the node creation is handled with udev - there is a problem as
stacked operation gives warning about existing node1 and will try to
remove it - while next operation needs to recreate it.

Current code removes all previous stacked operation if the fs op is
FS_DEL - patch adds similar behavior for FS_ADD - it will try to
remove any 'delete' operation if udev is in use.

For FS_RENAME operation it seems to be more complex. But as we
are always stacking FS_READ_AHEAD after FS_ADD operation -
should be safe to remove all previous operation on the node
when udev is running.

Code does same checking for stacking libdm and liblvm operations.

As a very simple optimization counters were added for each stacked ops
type to avoid unneeded list scans if some operation does not exists in
the list.

Enable skipping of fs_unlock() (udev sync) if only DEL operations are staked.
as we do not use lv_info for already deleted nodes.

13 years agoSuport DM_SECURE_DATA_FLAG.
Milan Broz [Fri, 4 Feb 2011 16:08:11 +0000 (16:08 +0000)]
Suport DM_SECURE_DATA_FLAG.

It will be user for cryptsetup to ensure buffers are properly
wiped when sending sensitive data (key).

13 years agoIncrease hash table size to 1024 lv names and 64 pv uuids
Zdenek Kabelac [Thu, 3 Feb 2011 16:03:13 +0000 (16:03 +0000)]
Increase hash table size to 1024 lv names and 64 pv uuids

13 years agoRemove fs_unlock from lv_resume path
Zdenek Kabelac [Thu, 3 Feb 2011 01:58:20 +0000 (01:58 +0000)]
Remove fs_unlock from lv_resume path

Keep it within clvmd until message for SYNC starts to work.

13 years agoFix wipe size when seting up mda.
Zdenek Kabelac [Thu, 3 Feb 2011 01:41:03 +0000 (01:41 +0000)]
Fix wipe size when seting up mda.

13 years agoDo not check for open_count when not needed.
Zdenek Kabelac [Thu, 3 Feb 2011 01:24:46 +0000 (01:24 +0000)]
Do not check for open_count when not needed.

Disable open_count checking in lv_info it it's not used.

Fix previous commit (comment out unsable code for now).

13 years agoSynchronize with udev for lv_info
Zdenek Kabelac [Thu, 3 Feb 2011 01:16:35 +0000 (01:16 +0000)]
Synchronize with udev for lv_info

In case the open_count is requested via lv_info - check if there
are any udev operations in-progress - and wait for them
before checking for lv_info

13 years agoa few more comments
Alasdair Kergon [Wed, 2 Feb 2011 23:57:48 +0000 (23:57 +0000)]
a few more comments

13 years agoAllow CLVMD_CMD_SYNC_NAMES to be propagated around the cluster if requested.
Alasdair Kergon [Wed, 2 Feb 2011 23:39:39 +0000 (23:39 +0000)]
Allow CLVMD_CMD_SYNC_NAMES to be propagated around the cluster if requested.

13 years agoBetter fix for no-locking udev sync and clvmd
Zdenek Kabelac [Wed, 2 Feb 2011 20:04:39 +0000 (20:04 +0000)]
Better fix for no-locking udev sync and clvmd

This is better way how to fix clustered synchronization with udev.
As the code for message passing needs fixed - put currently
fs_unlock() after every active/deactive command in clvmd to
ensure nodes are properly created in time.

13 years agoRevert wrong fix for nolock locking missing fs_unlock
Zdenek Kabelac [Wed, 2 Feb 2011 13:34:00 +0000 (13:34 +0000)]
Revert wrong fix for nolock locking missing fs_unlock

Patch was wrond and introduced recursive lock_vol
Reverting it.

13 years agoUpdate WHATS_NEW for lvmdump change.
Dave Wysochanski [Tue, 1 Feb 2011 21:41:31 +0000 (21:41 +0000)]
Update WHATS_NEW for lvmdump change.

13 years agoAdd "dmsetup ls --tree" output to lvmdump.
Dave Wysochanski [Tue, 1 Feb 2011 21:39:15 +0000 (21:39 +0000)]
Add "dmsetup ls --tree" output to lvmdump.

It would be most useful to add "dmsetup ls --tree" to the commands run.
This command helps in answering the question "which devices are actually
underneath a given LV?"

Although the info is available with other existing dmsetup commands,
adding this command gives a much clearer summary of complex setups.

Here's an example of an LVM mirror, with mirror images on partitions
created on top of multipath devices.  The multipath devices are on
simple block devices.  As you can see, it is easy to see the stacking
from the "dmsetup ls --tree" output:

vgmpathtest-lvmpathmir (253:14)
 ├─vgmpathtest-lvmpathmir_mimage_1 (253:13)
 │  └─mpath5p1 (253:5)
 │     └─mpath5 (253:2)
 │        ├─ (8:16)
 │        └─ (8:0)
 ├─vgmpathtest-lvmpathmir_mimage_0 (253:12)
 │  └─mpath6p1 (253:6)
 │     └─mpath6 (253:3)
 │        ├─ (8:48)
 │        └─ (8:32)
 └─vgmpathtest-lvmpathmir_mlog (253:11)
    └─mpath7 (253:4)
       ├─ (8:80)
       └─ (8:64)
VolGroup00-LogVol01 (253:1)
 └─ (202:2)
vgtest-lvmir (253:10)
 ├─vgtest-lvmir_mimage_1 (253:9)
 │  └─ (7:1)
 ├─vgtest-lvmir_mimage_0 (253:8)
 │  └─ (7:0)
 └─vgtest-lvmir_mlog (253:7)
    └─ (7:3)
VolGroup00-LogVol00 (253:0)
 └─ (202:2)

But it is much harder to see the stacking with only the commands today
("dmsetup info", "dmsetup status", and "dmsetup table").  We could
piece together the stacking from "dmsetup table" but it requires
further processing (take output from "dmsetup info to get
map name to major/minor, then parse "dmsetup table", etc).

13 years agofix bad 'strcmp's in 'decode_lock_type' - missing !'s
Jonathan Earl Brassow [Tue, 1 Feb 2011 17:31:40 +0000 (17:31 +0000)]
fix bad 'strcmp's in 'decode_lock_type' - missing !'s

There was no effect from having this wrong yet, because the
tree of callers only ever cared about the answer to the first
condition (!response), which determines whether a lock is
held or not.  Correct responses, however, are needed soon.

13 years agoSkip sysinit test for cluster
Zdenek Kabelac [Mon, 31 Jan 2011 22:05:30 +0000 (22:05 +0000)]
Skip sysinit test for cluster
Add #bin/bash to utils.sh
and update fsadm test to current version of aux script

13 years agoFix udev synchronization for no-locking mode
Zdenek Kabelac [Mon, 31 Jan 2011 19:52:40 +0000 (19:52 +0000)]
Fix udev synchronization for no-locking mode

Instead of implicitly syncing udev operation in clustered and
file locking code -  call synchronization directly in lock_vol() when
the operation unlocks VG

The problem is missing implicit fs_unlock() in the no_locking code.
This is used with --sysinit on read-only filesystem locking dir.
In this case vgchange -ay could exit before all udev nodes are properly
synchronised and may cause problems with accessing such node right after
vgchange --sysinint command is finished.

Add test case for vgchange --sysinit.

13 years agoAdd a debug message when uevent is not generated and we call udev_complete internally.
Peter Rajnoha [Mon, 31 Jan 2011 11:54:55 +0000 (11:54 +0000)]
Add a debug message when uevent is not generated and we call udev_complete internally.

13 years agoLower device size of pvmove test
Zdenek Kabelac [Fri, 28 Jan 2011 16:15:08 +0000 (16:15 +0000)]
Lower device size of pvmove test

Lower the size of devices in this test for speedup.
And check only once that  LVs are prepared properly.

13 years agoLower disk space usage of inconsistent mda test
Zdenek Kabelac [Fri, 28 Jan 2011 16:13:39 +0000 (16:13 +0000)]
Lower disk space usage of inconsistent mda test

Smaller size of devices speedups this test.

13 years agoReplacei sleep wait with udev settle
Zdenek Kabelac [Fri, 28 Jan 2011 16:12:45 +0000 (16:12 +0000)]
Replacei sleep wait with udev settle

Use new udev_wait command instead of unpredictable sleep waiting.
As with more devices in the system, udev processing is slower.

13 years agoQuery only test related vg name
Zdenek Kabelac [Fri, 28 Jan 2011 16:11:14 +0000 (16:11 +0000)]
Query only test related vg name

13 years agoAdd command to wait for udevadm settle
Zdenek Kabelac [Fri, 28 Jan 2011 16:10:21 +0000 (16:10 +0000)]
Add command to wait for udevadm settle

13 years agoDo not break pipes
Zdenek Kabelac [Fri, 28 Jan 2011 16:08:39 +0000 (16:08 +0000)]
Do not break pipes

As the option 'set -e -o pipefail' is very sensite on pipe breaking
stop using '-q' for grep commands.

Otherwise this command (with large enough table) would fail:

 dmsetup table | egrep -q

with exit code 141 (128 + SIGPIPE)

As Peter suggested, he prefers to keep '-o pipefail' - so make sure all
piped commands will read the whole output and will not exit too early.

13 years agoAccelerate mirror tests
Zdenek Kabelac [Fri, 28 Jan 2011 16:07:04 +0000 (16:07 +0000)]
Accelerate mirror tests

Instead of recreation of whole device set for each test round,
just cleanup created LVs to empty VG.
Lower the size of PV devices to 16MB

13 years agoDisplay duration of tests when it passed.
Zdenek Kabelac [Fri, 28 Jan 2011 16:05:38 +0000 (16:05 +0000)]
Display duration of tests when it passed.

Enhance output with info about the test duration.
Cleanup few declarations in the code.

13 years agoUpdating man pages
Zdenek Kabelac [Fri, 28 Jan 2011 16:03:38 +0000 (16:03 +0000)]
Updating man pages

13 years agoCompile code for memory debuging only with DEBUG_MEM
Zdenek Kabelac [Fri, 28 Jan 2011 16:01:32 +0000 (16:01 +0000)]
Compile code for memory debuging only with DEBUG_MEM

When it's not in use - do not compile this code.
Improves lcov code coverage results for this code a lot :)

13 years agoSet DM_UDEV_DISABLE_OTHER_RULES_FLAG for suspended DM devices in udev rules.
Peter Rajnoha [Fri, 28 Jan 2011 11:41:51 +0000 (11:41 +0000)]
Set DM_UDEV_DISABLE_OTHER_RULES_FLAG for suspended DM devices in udev rules.

This is to avoid any scanning and processing of DM devices while they are in
suspended state (e.g. a rename while the device is suspended - a CHANGE event
is generated!). Otherwise, any scanning in the rules could end up with locking
the calling process until the device is resumed and so we don't receive a
notification about udev rules completion until then (and that effectively
locks out the process awaiting the notification!).

However, we still keep 'disk' and any 'subsystem' related udev rules running.
We trust these and these should check themselves whether a device is suspended
or not, not trying to run any scanning if it is.

13 years agoUse memcpy and add error message
Zdenek Kabelac [Fri, 28 Jan 2011 10:19:00 +0000 (10:19 +0000)]
Use memcpy and add error message

strncpy (which check each byte for \0) is not need as we always copy
the length size - so using memcpy is a bit cheaper.

Add missing log_error message for failed allocation.

13 years agoSkip NULL check before dm_free
Zdenek Kabelac [Fri, 28 Jan 2011 10:16:04 +0000 (10:16 +0000)]
Skip NULL check before dm_free

dm_free checks for NULL itself.

13 years agoAvoid rebuilding of uuid validation table
Zdenek Kabelac [Fri, 28 Jan 2011 10:14:08 +0000 (10:14 +0000)]
Avoid rebuilding of uuid validation table

Small CPU relax...

13 years agoImprove lvcreate "insufficient extents" errors to "insufficient free space".
Mike Snitzer [Fri, 28 Jan 2011 02:58:00 +0000 (02:58 +0000)]
Improve lvcreate "insufficient extents" errors to "insufficient free space".

13 years agoUse O_DIRECT when reading block devices.
Alasdair Kergon [Thu, 27 Jan 2011 00:21:37 +0000 (00:21 +0000)]
Use O_DIRECT when reading block devices.

13 years agoAdd missing lvm_quit in test
Zdenek Kabelac [Wed, 26 Jan 2011 21:21:56 +0000 (21:21 +0000)]
Add missing lvm_quit in test

Fix occasional confusing memory leak report in testing.

13 years agoInitialize pool object for each row
Zdenek Kabelac [Tue, 25 Jan 2011 21:51:30 +0000 (21:51 +0000)]
Initialize pool object for each row

Fix assert abort of dmsetup (when compiled with pool debug)
dmsetup splitname --nameprefixes --noheadings --rows gvg-a2

Move pool begin in the inner loop - otherwise it would using
already 'ended' pool object.

13 years agopost-release
Alasdair Kergon [Mon, 24 Jan 2011 23:34:46 +0000 (23:34 +0000)]
post-release

13 years agopre-release
Alasdair Kergon [Mon, 24 Jan 2011 23:24:06 +0000 (23:24 +0000)]
pre-release

13 years agoBring lvscan man page up-to-date.
Alasdair Kergon [Mon, 24 Jan 2011 20:02:07 +0000 (20:02 +0000)]
Bring lvscan man page up-to-date.

13 years agoFix lvchange --test to exit cleanly.
Alasdair Kergon [Mon, 24 Jan 2011 14:19:05 +0000 (14:19 +0000)]
Fix lvchange --test to exit cleanly.

13 years agoAdd change_tag to toollib.
Alasdair Kergon [Mon, 24 Jan 2011 13:38:31 +0000 (13:38 +0000)]
Add change_tag to toollib.
Allow multiple pvchange command line options to be specified together.

13 years agoIf other process finishes (or aborts) pvmove operation and
Milan Broz [Wed, 19 Jan 2011 23:11:39 +0000 (23:11 +0000)]
If other process finishes (or aborts) pvmove operation and
polling function cannot find any lv with PVMOVE flag, return
success and do not print  "aborting" message.

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

13 years agoIn some versions (RHEL6) dlm_create_lockspace() always
Milan Broz [Wed, 19 Jan 2011 23:09:31 +0000 (23:09 +0000)]
In some versions (RHEL6) dlm_create_lockspace() always
return lockspace reference (even if lockspace already exists)
and thus increases DLM lockspace count. It means that after
clvmd restart the lockspace is still in use.

(The only way to clean environment to enable clean cluster
shutdown is call "dlm_tool leave clvmd" several times.)

Because only one clvmd can run in time, we can use simpler logic,
try to open lockspace with dlm_open_lockspace() and only if it fails
try to create new one. This way the lockspace reference doesn not
increase.

Very easily reproducible with  "clvmd -S" command.

Patch also fixes return code when clvmd_restart fails and fixes
double free if debug option was specified during restart.

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

13 years agoRemove duplicate statement (pasted twice by patch at some point?)
Jonathan Earl Brassow [Wed, 19 Jan 2011 19:24:07 +0000 (19:24 +0000)]
Remove duplicate statement (pasted twice by patch at some point?)

13 years agoAdd test to make sure that a log device is retained when a
Jonathan Earl Brassow [Wed, 19 Jan 2011 19:22:07 +0000 (19:22 +0000)]
Add test to make sure that a log device is retained when a
mirror image fails and the policies are set to:
 mirror_image_fault_policy = "replace"
 mirror_log_fault_policy = "remove"

13 years agoRemove DEBUGLOG from dmeventd.
Milan Broz [Mon, 17 Jan 2011 23:14:05 +0000 (23:14 +0000)]
Remove DEBUGLOG from dmeventd.

13 years agoAdd -f (don't fork) option to clvmd and fix clvmd -d<num> description.
Milan Broz [Mon, 17 Jan 2011 23:13:14 +0000 (23:13 +0000)]
Add -f (don't fork) option to clvmd and fix clvmd -d<num> description.

13 years agoremove unused definitions
Alasdair Kergon [Mon, 17 Jan 2011 19:02:44 +0000 (19:02 +0000)]
remove unused definitions

13 years agopost-release
Alasdair Kergon [Mon, 17 Jan 2011 18:16:18 +0000 (18:16 +0000)]
post-release

13 years agopre-release
Alasdair Kergon [Mon, 17 Jan 2011 16:46:50 +0000 (16:46 +0000)]
pre-release

13 years agoRemove -f from list of targets for cleanup
Zdenek Kabelac [Mon, 17 Jan 2011 15:18:10 +0000 (15:18 +0000)]
Remove -f from list of targets for cleanup

rm -f is already in used for this cleanup.

13 years agoDo not scan devices unnecessarily for reseting error counter
Zdenek Kabelac [Mon, 17 Jan 2011 15:16:55 +0000 (15:16 +0000)]
Do not scan devices unnecessarily for reseting error counter

For reseting error counter use directly btree cached elements and do not
create whole dev_iterator.

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