]> sourceware.org Git - lvm2.git/log
lvm2.git
13 years agoFix test to use explicit /dev/mapper/ node, /proc/mounts should not change this...
Milan Broz [Wed, 2 Mar 2011 13:49:29 +0000 (13:49 +0000)]
Fix test to use explicit /dev/mapper/ node, /proc/mounts should not change this...
(failed on RHEL5)

13 years agoAs requested in BZ 454618:
Petr Rockai [Wed, 2 Mar 2011 12:49:13 +0000 (12:49 +0000)]
As requested in BZ 454618:
- dmeventd -R will continue to start up even if no dmeventd is currently
  running + a test for this behaviour
- add -R to dmeventd manpage

13 years agoUse a copy if moving an mda from pv fid to vg fid.
Peter Rajnoha [Wed, 2 Mar 2011 10:23:29 +0000 (10:23 +0000)]
Use a copy if moving an mda from pv fid to vg fid.

We'll destroy the pv fid (with all mdas in it) after merging all pv mdas to
a vg in _text_pv_setup fn, hence we need to use a copy here!

13 years agoMake add_metadata_area_to_pv/remove_metadata_area_from_pv static.
Peter Rajnoha [Wed, 2 Mar 2011 10:19:14 +0000 (10:19 +0000)]
Make add_metadata_area_to_pv/remove_metadata_area_from_pv static.

No need to put these in format-text.h, it's not used anywhere else actually.

13 years agoIndent case part properly
Zdenek Kabelac [Wed, 2 Mar 2011 08:41:55 +0000 (08:41 +0000)]
Indent case part properly

13 years agoAdd missing return
Zdenek Kabelac [Wed, 2 Mar 2011 08:40:28 +0000 (08:40 +0000)]
Add missing return

13 years agoAccept multiple mapped device names on many dmsetup command lines.
Alasdair Kergon [Wed, 2 Mar 2011 02:44:56 +0000 (02:44 +0000)]
Accept multiple mapped device names on many dmsetup command lines.

13 years agoFix dm_udev_wait calls in dmsetup to occur before readahead display not after.
Alasdair Kergon [Wed, 2 Mar 2011 00:29:57 +0000 (00:29 +0000)]
Fix dm_udev_wait calls in dmsetup to occur before readahead display not after.
Include an implicit dm_task_update_nodes() within dm_udev_wait().

13 years agoRather return success if skipping udev wait.
Milan Broz [Tue, 1 Mar 2011 23:44:07 +0000 (23:44 +0000)]
Rather return success if skipping udev wait.

13 years agoInvert condition for READLINE check
Zdenek Kabelac [Tue, 1 Mar 2011 23:29:14 +0000 (23:29 +0000)]
Invert condition for READLINE check

13 years agoFix _create_and_load_v4 not to lose the --addnodeoncreate setting (1.02.62).
Alasdair Kergon [Tue, 1 Mar 2011 23:27:06 +0000 (23:27 +0000)]
Fix _create_and_load_v4 not to lose the --addnodeoncreate setting (1.02.62).

13 years agoBuild test.c also without readline library
Zdenek Kabelac [Tue, 1 Mar 2011 23:18:40 +0000 (23:18 +0000)]
Build test.c also without readline library

Allow bulding of this testing tool also without readline library.
Outputs message about build without readline library then.

13 years agoFix tests if udevadm missing (old udev).
Milan Broz [Tue, 1 Mar 2011 22:28:27 +0000 (22:28 +0000)]
Fix tests if udevadm missing (old udev).

13 years agoQuick fix to compile lvm2api tests when possible
Zdenek Kabelac [Tue, 1 Mar 2011 21:30:43 +0000 (21:30 +0000)]
Quick fix to compile lvm2api tests when possible

Do not build lvm2api tests when lvm2api lib is not enabled.

13 years agoFix some compile warnings on RHEL5
Milan Broz [Tue, 1 Mar 2011 20:17:56 +0000 (20:17 +0000)]
Fix some compile warnings on RHEL5
- returned char not needed to be explicitly const
- warn if pipe() fails in clvmd (more fixes here needed for error paths...)
- assign (and ignore) read() output in drain buffer

13 years agoRephrase backup message.
Milan Broz [Mon, 28 Feb 2011 20:50:01 +0000 (20:50 +0000)]
Rephrase backup message.

13 years agoFix void pointer arithmetic warning in pool debug code
Zdenek Kabelac [Mon, 28 Feb 2011 19:54:30 +0000 (19:54 +0000)]
Fix void pointer arithmetic warning in pool debug code

13 years agoAdd fall through comments
Zdenek Kabelac [Mon, 28 Feb 2011 19:53:03 +0000 (19:53 +0000)]
Add fall through comments

Add comments to switch case construct.

13 years agoRemove dead code
Zdenek Kabelac [Mon, 28 Feb 2011 19:50:15 +0000 (19:50 +0000)]
Remove dead code

Remove code which is no longer used.
Code which has been using msg_malloced was removed in 2007.

13 years agoTest result of dm_task_set_uuid
Zdenek Kabelac [Mon, 28 Feb 2011 19:47:22 +0000 (19:47 +0000)]
Test result of dm_task_set_uuid

13 years agoUse backward compatible configuration for test
Zdenek Kabelac [Mon, 28 Feb 2011 19:44:21 +0000 (19:44 +0000)]
Use backward compatible configuration for test

Currently the test are not properly working with new code.
Use settings for the previous behaviour.

FIXME: update tests to properly test new allocation policies.

13 years agomention vgreduce in pvremove man page
Alasdair Kergon [Mon, 28 Feb 2011 19:40:04 +0000 (19:40 +0000)]
mention vgreduce in pvremove man page

13 years agoImprove pvremove error message when PV belongs to a VG.
Alasdair Kergon [Mon, 28 Feb 2011 19:35:09 +0000 (19:35 +0000)]
Improve pvremove error message when PV belongs to a VG.

13 years agoAdd a hint for manual revert if there's an error in pv_write, vg_write, vg_commit...
Peter Rajnoha [Mon, 28 Feb 2011 17:08:09 +0000 (17:08 +0000)]
Add a hint for manual revert if there's an error in pv_write, vg_write, vg_commit for pvresize.

13 years agoUse pv->vg_name directly instead of pv->vg->name in _text_pv_write.
Peter Rajnoha [Mon, 28 Feb 2011 17:05:48 +0000 (17:05 +0000)]
Use pv->vg_name directly instead of pv->vg->name in _text_pv_write.

This also prevents a possible segfault during an automatic repair
when the PV does not belong to a VG anymore and we call pv_write_orphan.

13 years agoAllow non-orphan PVs with two metadata areas to be resized.
Peter Rajnoha [Mon, 28 Feb 2011 13:19:02 +0000 (13:19 +0000)]
Allow non-orphan PVs with two metadata areas to be resized.

We allow writing non-orphan PVs only for resize now. The "orphan PV" assert
in pv_write fn uses the "allow_non_orphan" parameter to control this assert.
However, we should find a more elaborate solution so we can remove this
restriction altogether (pv_write together with vg_write is not atomic, we
need to find a safe mechanism so there's an easy revert possible in case of
an error).

13 years agoFix check for log-only allocation in new alloc normal loop.
Alasdair Kergon [Sun, 27 Feb 2011 01:16:52 +0000 (01:16 +0000)]
Fix check for log-only allocation in new alloc normal loop.

13 years agoVarious changes to the allocation algorithms: Expect some fallout.
Alasdair Kergon [Sun, 27 Feb 2011 00:38:31 +0000 (00:38 +0000)]
Various changes to the allocation algorithms: Expect some fallout.
There is a lot to test.

Two new config settings added that are intended to make the code behave
closely to the way it did before - worth a try if you find problems.

13 years agovgconvert is fixed now to work with the changes in metadata area handling - enable...
Peter Rajnoha [Fri, 25 Feb 2011 14:12:14 +0000 (14:12 +0000)]
vgconvert is fixed now to work with the changes in metadata area handling - enable the tests.
Add a small fix that preserves pe_start for lvm1 PVs when being converted.

(this fix needs to be replaced with something more clever, but let's have this working now)

13 years agoAllow only orphan PVs to be resized even with two metadata areas.
Peter Rajnoha [Fri, 25 Feb 2011 14:08:54 +0000 (14:08 +0000)]
Allow only orphan PVs to be resized even with two metadata areas.

13 years agoRevert the patch for vgconvert to work with recent changes in metadata area handling.
Peter Rajnoha [Fri, 25 Feb 2011 14:02:53 +0000 (14:02 +0000)]
Revert the patch for vgconvert to work with recent changes in metadata area handling.

This should work now with the help of the patch from previous commit.

13 years agoRead PV metadata information from cache if pv_setup called with pv->fid == vg->fid.
Peter Rajnoha [Fri, 25 Feb 2011 13:59:47 +0000 (13:59 +0000)]
Read PV metadata information from cache if pv_setup called with pv->fid == vg->fid.

If the PV is already part of the VG (so the pv->fid == vg->fid), it makes no
sense to attach the mdas information from PV to a VG. Instead, we read new
PV metadata information from cache and attach it to the VG fid.

13 years agoFix a bug in metadata location calculation, cleanup pv_add_metadata_area fn.
Peter Rajnoha [Fri, 25 Feb 2011 13:50:02 +0000 (13:50 +0000)]
Fix a bug in metadata location calculation, cleanup pv_add_metadata_area fn.

This bug (a missing line) caused the 2nd MDA area location to be calculated
incorrectly and it didn't fit the disk size properly.

(https://www.redhat.com/archives/lvm-devel/2011-February/msg00127.html)

13 years agoRemove a few size_t type warnings.
Peter Rajnoha [Tue, 22 Feb 2011 10:01:11 +0000 (10:01 +0000)]
Remove a few size_t type warnings.

13 years agoAdd inactive table query support for kernel driver >= 4.11.6 (RHEL 5.7).
Mike Snitzer [Mon, 21 Feb 2011 16:26:23 +0000 (16:26 +0000)]
Add inactive table query support for kernel driver >= 4.11.6 (RHEL 5.7).

13 years ago%ld -> PRIu64
Peter Rajnoha [Mon, 21 Feb 2011 13:09:27 +0000 (13:09 +0000)]
%ld -> PRIu64

13 years agoWHATS_NEW
Peter Rajnoha [Mon, 21 Feb 2011 12:40:46 +0000 (12:40 +0000)]
WHATS_NEW

13 years agoTemporarily disable 'convert a VG from lvm2 to lvm1 format' test until a known issue...
Peter Rajnoha [Mon, 21 Feb 2011 12:37:33 +0000 (12:37 +0000)]
Temporarily disable 'convert a VG from lvm2 to lvm1 format' test until a known issue is resolved.

Otherwise we get an error:

  PV segment VG free_count mismatch: 32 != 33
  PV segment VG extent_count mismatch: 32 != 33

13 years agoFix metadata balance code to work with recent changes in metadata handling
Peter Rajnoha [Mon, 21 Feb 2011 12:33:16 +0000 (12:33 +0000)]
Fix metadata balance code to work with recent changes in metadata handling
interface (with the changes in format_instance).

13 years agoAdd old_uuid field to struct physical_volume so we can still reference a PV
Peter Rajnoha [Mon, 21 Feb 2011 12:31:28 +0000 (12:31 +0000)]
Add old_uuid field to struct physical_volume so we can still reference a PV
with its old UUID when we're changig it (the cache as well as metadata area
index has the old uuid that we need to use to access the information!)

13 years agoFix vgconvert code to work with changes in metadata area handling and changes
Peter Rajnoha [Mon, 21 Feb 2011 12:29:21 +0000 (12:29 +0000)]
Fix vgconvert code to work with changes in metadata area handling and changes
in format_instance. Add new 'vg_convert' function.

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 old-v2_02_84 v2_02_84
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 old-v2_02_83 v2_02_83
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.

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