]> sourceware.org Git - lvm2.git/log
lvm2.git
14 years agoUpdate doxygen comments for lvm2app.h.
Dave Wysochanski [Wed, 24 Feb 2010 18:16:44 +0000 (18:16 +0000)]
Update doxygen comments for lvm2app.h.

Fix add/remove tag function headers.
Fix a lot of little problems with doxygen comments.
Clarify the basic objects and their handles, and place functions with their
appropriate handles/objects.
All this cleanup moves automatic documentation of lvm2app much closer to being
useful as official documentation.  In the future I will add some examples
and plan to build the examples as part of the unit tests.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoUpdate lvm2app interactive unit test for vg/lv tags.
Dave Wysochanski [Wed, 24 Feb 2010 18:16:35 +0000 (18:16 +0000)]
Update lvm2app interactive unit test for vg/lv tags.

Simple test of vg/lv tag addition/deletion.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoAdd lvm_lv_get_tags(), lvm_lv_add_tag(), and lvm_lv_remove_tag().
Dave Wysochanski [Wed, 24 Feb 2010 18:16:26 +0000 (18:16 +0000)]
Add lvm_lv_get_tags(), lvm_lv_add_tag(), and lvm_lv_remove_tag().

Add lvm2app functions to manage LV tags.
For lvm_lv_get_tags(), we return a list of tags, similar to other
functions that return lists.  An empty list is returned if there
are no tags.  NULL is returned if there is a problem obtaining
the list of tags.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoAdd lvm_vg_get_tags(), lvm_vg_add_tag(), and lvm_vg_remove_tag().
Dave Wysochanski [Wed, 24 Feb 2010 18:16:18 +0000 (18:16 +0000)]
Add lvm_vg_get_tags(), lvm_vg_add_tag(), and lvm_vg_remove_tag().

Add lvm2app functions to manage VG tags.
For lvm_vg_get_tags(), we return a list of tags, similar to other
functions that return lists.  An empty list is returned if there
are no VG tags.  NULL is returned if there is a problem obtaining
the list of tags.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoAdd tag_list_copy() supporting function inside lvm2app.
Dave Wysochanski [Wed, 24 Feb 2010 18:16:10 +0000 (18:16 +0000)]
Add tag_list_copy() supporting function inside lvm2app.

Add a supporting function to copy a list of internal tags to lvm2app list.
We need to put this here because of the lvm_str_list_t type which we export
in lvm2app.h.  If we didn't export this type, we could put this in the
internal library and use struct str_list.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoAdd dm_pool_strdup to allocate memory and copy a tag in {lv|vg}_change_tag()
Dave Wysochanski [Wed, 24 Feb 2010 18:15:57 +0000 (18:15 +0000)]
Add dm_pool_strdup to allocate memory and copy a tag in {lv|vg}_change_tag()

We need to allocate memory for the tag and copy the tag value before we
add it to the list of tags.  We could put this inside lvm2app since the
tools keep their memory around until vg_write/vg_commit is called, but
we put it inside the internal library to minimize code in lvm2app.
We need to copy the tag passed in by the caller to ensure the lifetime of
the memory until the {vg|lv} handle is released.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoRefactor lvchange_tag() to call lv_change_tag() library function.
Dave Wysochanski [Wed, 24 Feb 2010 18:15:49 +0000 (18:15 +0000)]
Refactor lvchange_tag() to call lv_change_tag() library function.

Similar refactoring to vgchange - pull out common parts and put into
library function for reuse.  Should be no functional change.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoRefactor vgcreate to call new vg_change_tag() function.
Dave Wysochanski [Wed, 24 Feb 2010 18:15:40 +0000 (18:15 +0000)]
Refactor vgcreate to call new vg_change_tag() function.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoRefactor _vgchange_tag() to vg_change_tag() library function.
Dave Wysochanski [Wed, 24 Feb 2010 18:15:05 +0000 (18:15 +0000)]
Refactor _vgchange_tag() to vg_change_tag() library function.

Pull out common code to be called from tools as well as lvm2app.
Leave archive() at tool level so we can use from vgcreate
as well as vgchange.  Should be no functional change.
- add stack macro in vgchange

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoAdd _mlog devices to dependency trees using UUID, not name, in activation.
Petr Rockai [Tue, 23 Feb 2010 15:49:52 +0000 (15:49 +0000)]
Add _mlog devices to dependency trees using UUID, not name, in activation.

14 years agoRelax a check on blkid exit value, which seems to be different in different
Petr Rockai [Mon, 22 Feb 2010 14:47:55 +0000 (14:47 +0000)]
Relax a check on blkid exit value, which seems to be different in different
versions. Fixes a spurious test failure introduced with -o pipefail.

14 years agoDo not reload origin again in lv_remove_single() if it had a merging
Mike Snitzer [Wed, 17 Feb 2010 23:36:45 +0000 (23:36 +0000)]
Do not reload origin again in lv_remove_single() if it had a merging
snapshot.  vg_remove_snapshot() will have already performed the required
reload.

14 years agoRefactor snapshot-merge deptree and device removal to support info-by-uuid
Mike Snitzer [Wed, 17 Feb 2010 22:59:46 +0000 (22:59 +0000)]
Refactor snapshot-merge deptree and device removal to support info-by-uuid

Add a merging snapshot to the deptree, using the "error" target, rather
than avoid adding it entirely.  This allows proper cleanup of the -cow
device without having to rename the -cow to use the origin's name as a
prefix.

Move the preloading of the origin LV, after a merge, from
lv_remove_single() to vg_remove_snapshot().  Having vg_remove_snapshot()
preload the origin allows the -cow device to be released so that it can
be removed via deactivate_lv().  lv_remove_single()'s deactivate_lv()
reliably removes the -cow device because the associated snapshot LV,
that is to be removed when a snapshot-merge completes, is always added
to the deptree (and kernel -- via "error" target).

Now when the snapshot LV is removed both the -cow and -real devices
get removed using uuid rather than device name.  This paves the way
for us to switch over to info-by-uuid queries.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
14 years agoIn testsuite, catch also failures that happen in the middle of a pipeline.
Petr Rockai [Wed, 17 Feb 2010 15:41:28 +0000 (15:41 +0000)]
In testsuite, catch also failures that happen in the middle of a pipeline.

14 years agoAdd nightly test to cover vg/lv tags add/delete.
Dave Wysochanski [Tue, 16 Feb 2010 17:49:18 +0000 (17:49 +0000)]
Add nightly test to cover vg/lv tags add/delete.

Simple nightly test coverage for adding / deleting lv/vg tags via
create and change functions.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoAdd get_{pv|vg|lv}_field() nightly test helper functions.
Dave Wysochanski [Tue, 16 Feb 2010 17:48:46 +0000 (17:48 +0000)]
Add get_{pv|vg|lv}_field() nightly test helper functions.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agouse lvm2app to refer to library now
Alasdair Kergon [Tue, 16 Feb 2010 01:14:34 +0000 (01:14 +0000)]
use lvm2app to refer to library now

14 years agopost-release
Alasdair Kergon [Tue, 16 Feb 2010 00:27:01 +0000 (00:27 +0000)]
post-release

14 years agopre-release
Alasdair Kergon [Mon, 15 Feb 2010 23:53:15 +0000 (23:53 +0000)]
pre-release

14 years agoUpdate
Zdenek Kabelac [Mon, 15 Feb 2010 20:32:27 +0000 (20:32 +0000)]
Update

14 years agoUse dm_report_field_int32 instead of dm_report_field_uint64 for printing '-1'
Zdenek Kabelac [Mon, 15 Feb 2010 20:27:33 +0000 (20:27 +0000)]
Use dm_report_field_int32 instead of dm_report_field_uint64 for printing '-1'

14 years agoUpdate lvm2app.h comments to remove hidden VG comment list vgnames/vgids.
Dave Wysochanski [Mon, 15 Feb 2010 19:55:49 +0000 (19:55 +0000)]
Update lvm2app.h comments to remove hidden VG comment list vgnames/vgids.

Peter recently fixed lvm_list_vg_names() and lvm_list_vg_uuids() so they
no longer return hidden names.  Remove the comment in lvm2app.h.

14 years ago* update for last 3 commits
Zdenek Kabelac [Mon, 15 Feb 2010 18:42:51 +0000 (18:42 +0000)]
* update for last 3 commits

14 years agoFix dm_report_field_uint64 to really use 64bit.
Zdenek Kabelac [Mon, 15 Feb 2010 18:36:48 +0000 (18:36 +0000)]
Fix dm_report_field_uint64 to really use 64bit.
(function is currently not in use)

14 years agoCleanup float arithmetic gcc warning.
Zdenek Kabelac [Mon, 15 Feb 2010 18:35:06 +0000 (18:35 +0000)]
Cleanup float arithmetic gcc warning.

14 years ago* add more 'const' - fixes gcc constness warning
Zdenek Kabelac [Mon, 15 Feb 2010 18:34:00 +0000 (18:34 +0000)]
* add more 'const' - fixes gcc constness warning

14 years agoAdd LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment variable to suppress error
Peter Rajnoha [Mon, 15 Feb 2010 16:46:56 +0000 (16:46 +0000)]
Add LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment variable to suppress error
and warning mesages while --ignorelockingfailure is used.

14 years agoRemove hard-coded rule to skip _mimage devices in 11-dm-lvm.rules.
Peter Rajnoha [Mon, 15 Feb 2010 16:38:22 +0000 (16:38 +0000)]
Remove hard-coded rule to skip _mimage devices in 11-dm-lvm.rules.

There's a tiny period of time when the _mimage device is visible during
downconversion from mirror to linear. Since it is visible, we need to
create the symlinks, otherwise warning messages will be issued about udev
not creating those symlinks. We have to rely on udev flags completely.

14 years agoUpdate man page for dmsetup: --udevcookie, udevcreatecookie and udevreleasecookie.
Peter Rajnoha [Mon, 15 Feb 2010 16:32:24 +0000 (16:32 +0000)]
Update man page for dmsetup: --udevcookie, udevcreatecookie and udevreleasecookie.

14 years agoUse udev transactions in testsuite.
Peter Rajnoha [Mon, 15 Feb 2010 16:30:13 +0000 (16:30 +0000)]
Use udev transactions in testsuite.

14 years agoDon't use LVM_UDEV_DISABLE_CHECKING environment variable anymore.
Peter Rajnoha [Mon, 15 Feb 2010 16:26:48 +0000 (16:26 +0000)]
Don't use LVM_UDEV_DISABLE_CHECKING environment variable anymore.

Set the state automatically based on udev and libdevmapper dev path comparison.
If these paths differ, disable udev checking.

14 years agoSeveral changes in dmsetup and libdevmapper:
Peter Rajnoha [Mon, 15 Feb 2010 16:21:33 +0000 (16:21 +0000)]
Several changes in dmsetup and libdevmapper:

 - add DM_UDEV_DISABLE_LIBRARY_FALLBACK udev flag to rely on udev only

 - export dm_udev_create_cookie function to create new cookies on demand

 - add --udevcookie, udevcreatecookie and udevreleasecookie for dmsetup
   (to support "udev transactions" where one cookie value can be used for
    several dmsetup calls)

 - don't use DM_UDEV_DISABLE_CHECKING env. var. anymore and set the state
   automatically (based on udev and libdevmapper dev path comparison)

14 years agoRename "stat" to "status" in dmeventd_snapshot.c.
Peter Rajnoha [Mon, 15 Feb 2010 12:55:20 +0000 (12:55 +0000)]
Rename "stat" to "status" in dmeventd_snapshot.c.

Otherwise "warning: declaration of ‘stat’ shadows a global declaration"
will appear because it shadows "stat" from stat.h.

14 years agoUpdate simple lvm2app unit test for new size apis.
Dave Wysochanski [Sun, 14 Feb 2010 03:23:07 +0000 (03:23 +0000)]
Update simple lvm2app unit test for new size apis.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoExport lvm_pv_get_size(), lvm_pv_get_free(), lvm_pv_get_dev_size in lvm2app.
Dave Wysochanski [Sun, 14 Feb 2010 03:21:37 +0000 (03:21 +0000)]
Export lvm_pv_get_size(), lvm_pv_get_free(), lvm_pv_get_dev_size in lvm2app.

We add these exports to show the pv_size and pv_free and dev_size
fields.
Fixes rhbz561423.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoFix off by 512 sizes for lvm2app.
Dave Wysochanski [Sun, 14 Feb 2010 03:21:06 +0000 (03:21 +0000)]
Fix off by 512 sizes for lvm2app.

Internally we store sizes in sectors, but lvm2app exports sizes
in bytes.  We could get fancier and allow units configuration but
this fix should do for now.

Fixes rhbz561422.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoAdd 'fail_if_percent_unsupported' arg to _percent() and _percent_run().
Mike Snitzer [Wed, 10 Feb 2010 15:56:20 +0000 (15:56 +0000)]
Add 'fail_if_percent_unsupported' arg to _percent() and _percent_run().

14 years agoAdd 'fail_if_percent_unsupported' arg to _percent() and _percent_run().
Mike Snitzer [Wed, 10 Feb 2010 14:38:24 +0000 (14:38 +0000)]
Add 'fail_if_percent_unsupported' arg to _percent() and _percent_run().

We unfortunately don't yet _know_, in dev_manager_snapshot_percent(), if
a snapshot-merge target is active (activation is deferred if dev is
open); so we can't short-circuit origin devices based purely on existing
LVM LV attributes.

Set 'fail_if_percent_unsupported' in dev_manager_snapshot_percent() for
a merging origin LV, otherwise passing unsupported LV types to _percent
will lead to a default successful return with percent_range as
PERCENT_100.

For a merging origin, PERCENT_100 will result in a polldaemon that runs
infinitely (because completion is PERCENT_0).

14 years agoRemove false "failed to find tree node for <lv>" error from _cached_info().
Mike Snitzer [Mon, 8 Feb 2010 23:28:06 +0000 (23:28 +0000)]
Remove false "failed to find tree node for <lv>" error from _cached_info().

When activating a merging origin it is valid, and expected, to not have
a node in the deptree for both the origin and its merging snapshot.  The
_cached_info() caller is only concerned with whether a device is open.
If there isn't a node in the tree the associated device is definitely
not open.

14 years agoMake lvconvert --repair --use-policies exit with success when no action is needed.
Petr Rockai [Sat, 6 Feb 2010 07:44:16 +0000 (07:44 +0000)]
Make lvconvert --repair --use-policies exit with success when no action is needed.

14 years agoAdd multiple snapshot lv 'lvconvert --merge @tag' support via process_each_lv().
Mike Snitzer [Fri, 5 Feb 2010 22:50:56 +0000 (22:50 +0000)]
Add multiple snapshot lv 'lvconvert --merge @tag' support via process_each_lv().

14 years agoSwitch lvconvert_single() over to using get_vg_lock_and_logical_volume()
Mike Snitzer [Fri, 5 Feb 2010 22:47:22 +0000 (22:47 +0000)]
Switch lvconvert_single() over to using get_vg_lock_and_logical_volume()

This change was deferred to help ease the review of previous refactoring
related to using process_each_lv() for lvconvert's merge support.  Not
that doing so _really_ helped but...

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
14 years agolvconvert --merge @tag support
Mike Snitzer [Fri, 5 Feb 2010 22:44:37 +0000 (22:44 +0000)]
lvconvert --merge @tag support

Switch lvconvert's --merge code over to using process_each_lv().  Doing
so adds support for a single 'lvconvert --merge' to start merging
multiple LVs (which includes @tag expansion).

Add 'lvconvert --merge @tag' testing to test/t-snapshot-merge.sh

Adjust man/lvconvert.8.in to reflect these expanded capabilities.

The lvconvert.c implementation requires rereading the VG each iteration
of process_each_lv().  Otherwise a stale VG instance associated with
the LV passed to lvconvert_single_merge() would result in stale VG
metadata being written back out to disk.  This overwrote new metadata
that was written when a previous snapshot LV finished merging (via
lvconvert_poll).  This is only an issue when merging multiple LVs that
share the same VG (a single VG is typical for most LVM configurations on
system disks).

In the end this new support is very useful for performing a "system
rollback" that requires multiple snapshot LVs be merged to their
respective origin LV.

The yum-utils 'fs-snapshot' plugin tags all snapshot LVs that it creates
with a common 'snapshot_tag' that is unique to the yum transaction.
Rolling back a yum transaction, that created LVM snapshots with the tag
'yum_20100129133223', is as simple as:
  lvconvert --merge @yum_20100129133223

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
14 years agoPrepare for _get_lvconvert_vg() reuse as part of a larger lvconvert.c
Mike Snitzer [Fri, 5 Feb 2010 22:40:49 +0000 (22:40 +0000)]
Prepare for _get_lvconvert_vg() reuse as part of a larger lvconvert.c
refactoring.

Document the need to cleanup the "name" args passed around polldaemon,
lvconvert and pvmove.  It is quite a mess.

Annotate the unused nature of the existing poll_fns->get_copy_vg
methods' 'uuid' arg.

14 years agoAdding a new mimage (leg/copy) to a mirror behaves differently
Jonathan Earl Brassow [Fri, 5 Feb 2010 21:49:16 +0000 (21:49 +0000)]
Adding a new mimage (leg/copy) to a mirror behaves differently
depending on if the mirror has a 'core' or 'disk' log.  When there
is a disk log, the new leg is added by stacking a new mirror on
top of the old (one leg is the old mirror and the other leg is the newly
added device).  When the log is a 'core' log, the new leg is simply added
to the existing mirror and all the devices are re-synced.

The logic that handles collapsing the stacked 'disk' log mirror was
having the effect of causing 'core' logged mirrors to begin resync'ing
for a second time.  I have used the 'CONVERTING' flag to indicate that
a mirror is converting by way of stacking.  This is no longer set for
up-converting core logs.  The final 'collapse' logic can safely be skipped
for 'core' log mirrors - getting rid of the second resync.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
14 years agoThis is related to liblvm and its lvm_list_vg_names() and lvm_list_vg_uuids() functions
Peter Rajnoha [Wed, 3 Feb 2010 14:08:39 +0000 (14:08 +0000)]
This is related to liblvm and its lvm_list_vg_names() and lvm_list_vg_uuids() functions
where we should not expose internal VG names/uuids (the ones with "#" prefix )through the
interface. Otherwise, we could end up with library users opening internal VGs which will
initiate locking mechanism that won't be cleaned up properly.

"#orphans_{lvm1, lvm2, pool}" names are treated in a special way, they are truncated first
to "orphans" and this is used as a part of the lock name then (e.g. while calling lvm_vg_open()).
When library user calls lvm_vg_close(), the original name "orphans_{lvm1, lvm2, pool}"
is used directly and therefore no unlock occurs.

We should exclude internal VG names and uuids in the lists provided by lvmcache:
lvmcache_get_vgids() and lvmcache_get_vgnames().

14 years agoAdd %ORIGIN support to lv{create,extend,reduce,resize} --extents option
Mike Snitzer [Wed, 3 Feb 2010 03:58:08 +0000 (03:58 +0000)]
Add %ORIGIN support to lv{create,extend,reduce,resize} --extents option

Allow the number of logical extents to be expressed (for a snapshot) as
a percentage of the total space in the Origin Logical Volume with the
suffix %ORIGIN.

Update the relevant man pages accordingly.  Eliminate inconsistencies
between the man pages and tools/commands.h

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
14 years agomove WHATS_NEW entries whose changes were made after 2.02.60 to 2.02.61
Mike Snitzer [Tue, 2 Feb 2010 17:48:30 +0000 (17:48 +0000)]
move WHATS_NEW entries whose changes were made after 2.02.60 to 2.02.61

14 years agoAdd copy constructor for struct metadata_area.
Dave Wysochanski [Tue, 2 Feb 2010 16:26:34 +0000 (16:26 +0000)]
Add copy constructor for struct metadata_area.

Clean up cut&paste code with proper copy constructor.

14 years agoRemove pointless versioned symlinks to dmeventd plugin libraries.
Alasdair Kergon [Tue, 2 Feb 2010 14:09:17 +0000 (14:09 +0000)]
Remove pointless versioned symlinks to dmeventd plugin libraries.

14 years agoFix dmeventd snapshot plugin build dependency.
Alasdair Kergon [Tue, 2 Feb 2010 14:03:50 +0000 (14:03 +0000)]
Fix dmeventd snapshot plugin build dependency.

14 years agoMake clvmd -V return zero status rather than 1.
Christine Caulfield [Tue, 2 Feb 2010 08:54:29 +0000 (08:54 +0000)]
Make clvmd -V return zero status rather than 1.

14 years agoRemove unnecessary "dmsetup resume" after "dmsetup create".
Dave Wysochanski [Mon, 1 Feb 2010 19:43:22 +0000 (19:43 +0000)]
Remove unnecessary "dmsetup resume" after "dmsetup create".

It is not necessary to resume after a create since the create will
create the table and make it active.

14 years agoWas using dm_list_iterate_items when I should have been using
Jonathan Earl Brassow [Wed, 27 Jan 2010 22:28:05 +0000 (22:28 +0000)]
Was using dm_list_iterate_items when I should have been using
*_safe.  This had the effect of segfaulting the log daemon when
converting a mirror from one log type to another.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
14 years agoFix pvmove abort when temporary mirror fails to be cluster-aware.
Milan Broz [Wed, 27 Jan 2010 13:29:11 +0000 (13:29 +0000)]
Fix pvmove abort when temporary mirror fails to be cluster-aware.

When activation of pvmove mirror fails on cluster, some nodes
still possibly succeeded in activation.

 - Explicitly deactivate that mirror to be sure
 - properly pair suspend/resume calls to not cause memory lock problems in clvmd

Code cannot simply call _finish_pvmove on cluster in this situation, because
changed LVs are suspended twice (causing memory inbalance) and also temporary
mirror is activated when it is not expected (and we know that it failed already).

Patch prepares special function which remove temporary mirror references from
metadata and then resumes changed LVs.

14 years agoAlways query device by using uuid only and not name in clvmd.
Milan Broz [Wed, 27 Jan 2010 13:23:57 +0000 (13:23 +0000)]
Always query device by using uuid only and not name in clvmd.

Otherwise confusion with the device of the same name
(but different UUID, e.g. non-lvm device) can happen.

14 years agoAdd some missing vg_revrts calls when pvmove aborts.
Milan Broz [Tue, 26 Jan 2010 08:01:18 +0000 (08:01 +0000)]
Add some missing vg_revrts calls when pvmove aborts.

14 years agoUnlock shared lock if activation calls failed.
Milan Broz [Tue, 26 Jan 2010 08:00:02 +0000 (08:00 +0000)]
Unlock shared lock if activation calls failed.

Clvmd should unlock new lock if activation in device-mapper fails.

14 years agoFix return code of info callbacks.
Milan Broz [Tue, 26 Jan 2010 07:58:23 +0000 (07:58 +0000)]
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.

14 years agopre-release
Alasdair Kergon [Sat, 23 Jan 2010 02:14:30 +0000 (02:14 +0000)]
pre-release

14 years agoDefault to checking LV's progress before waiting in _wait_for_single_lv.
Mike Snitzer [Fri, 22 Jan 2010 21:59:42 +0000 (21:59 +0000)]
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.

14 years agoa little more information for the cmirrord man page
Jonathan Earl Brassow [Fri, 22 Jan 2010 21:48:17 +0000 (21:48 +0000)]
a little more information for the cmirrord man page

14 years agoFix syntax error in cmirror init script
Milan Broz [Fri, 22 Jan 2010 16:19:38 +0000 (16:19 +0000)]
Fix syntax error in cmirror init script
 - break cannot be used here
 - remove CLVMDOPTS
 - add echo to stop call

14 years agoEliminate extra ioctls just to check open_count in _add_new_lv_to_dtree.
Mike Snitzer [Fri, 22 Jan 2010 15:40:31 +0000 (15:40 +0000)]
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.

14 years agoDocument undocumented commits which fixed some bugs.
Milan Broz [Fri, 22 Jan 2010 14:33:33 +0000 (14:33 +0000)]
Document undocumented commits which fixed some bugs.
Go WHATS_NEW!

14 years agoRemoved inactive_table check from _lv_has_target_type. This check
Mike Snitzer [Fri, 22 Jan 2010 13:28:54 +0000 (13:28 +0000)]
Removed inactive_table check from _lv_has_target_type.  This check
doesn't offer any benefit (that I can recall) and testing validates
that.

14 years agoSwitch memory debugging off for now if compiled with dmeventd,
Milan Broz [Fri, 22 Jan 2010 13:20:32 +0000 (13:20 +0000)]
Switch memory debugging off for now if compiled with dmeventd,
functions are not thread-safe in debug mode.

14 years agoFix syslog prefix in the first message (dmeventd->lvm).
Milan Broz [Fri, 22 Jan 2010 12:48:58 +0000 (12:48 +0000)]
Fix syslog prefix in the first message (dmeventd->lvm).

14 years agoFix exported symbols for lvm2 dmeventd wrapper.
Milan Broz [Fri, 22 Jan 2010 12:38:16 +0000 (12:38 +0000)]
Fix exported symbols for lvm2 dmeventd wrapper.

14 years agoMove error message to locking constructor and print
Milan Broz [Fri, 22 Jan 2010 09:45:29 +0000 (09:45 +0000)]
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.

14 years agopost-release
Alasdair Kergon [Fri, 22 Jan 2010 01:09:09 +0000 (01:09 +0000)]
post-release

14 years agomissing header
Alasdair Kergon [Fri, 22 Jan 2010 00:43:28 +0000 (00:43 +0000)]
missing header

14 years agofix lib include
Alasdair Kergon [Fri, 22 Jan 2010 00:18:37 +0000 (00:18 +0000)]
fix lib include

14 years agopre-release
Alasdair Kergon [Thu, 21 Jan 2010 23:55:17 +0000 (23:55 +0000)]
pre-release

14 years agoAdd libdevmapper-event-lvm2.so to serialise dmeventd plugin liblvm2cmd use.
Alasdair Kergon [Thu, 21 Jan 2010 22:15:45 +0000 (22:15 +0000)]
Add libdevmapper-event-lvm2.so to serialise dmeventd plugin liblvm2cmd use.

14 years agoCall _alloc_pv() inside _pv_read() and clean up error paths.
Dave Wysochanski [Thu, 21 Jan 2010 21:09:23 +0000 (21:09 +0000)]
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().

14 years agoRemove useless memory allocation for pv->vg_name in _alloc_pv().
Dave Wysochanski [Thu, 21 Jan 2010 21:04:44 +0000 (21:04 +0000)]
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.

14 years agoCorrect 'void *' usage in pvcreate_single.
Dave Wysochanski [Thu, 21 Jan 2010 21:04:20 +0000 (21:04 +0000)]
Correct 'void *' usage in pvcreate_single.

Remove needless cast.

14 years agoLog entry for the last lvmcmdline.c commit
Zdenek Kabelac [Thu, 21 Jan 2010 17:14:18 +0000 (17:14 +0000)]
Log entry for the last lvmcmdline.c commit

14 years agoReset released pointer and counters.
Zdenek Kabelac [Thu, 21 Jan 2010 13:41:39 +0000 (13:41 +0000)]
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.

14 years agoPreload the origin prior to suspend IFF snapshot(s) still exist after a
Mike Snitzer [Wed, 20 Jan 2010 21:53:10 +0000 (21:53 +0000)]
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.

14 years agoFill in a little more on the man page for cmirrord
Jonathan Earl Brassow [Wed, 20 Jan 2010 15:17:25 +0000 (15:17 +0000)]
Fill in a little more on the man page for cmirrord

14 years agoDeal with a few more compiler warnings.
Alasdair Kergon [Wed, 20 Jan 2010 02:43:19 +0000 (02:43 +0000)]
Deal with a few more compiler warnings.

14 years agoAdd t-topology-support.sh and t-snapshot-merge.sh tests.
Mike Snitzer [Tue, 19 Jan 2010 23:02:04 +0000 (23:02 +0000)]
Add t-topology-support.sh and t-snapshot-merge.sh tests.

14 years agoadd test/t-snapshot-merge.sh to provide coverage of snapshot-merge support
Mike Snitzer [Tue, 19 Jan 2010 22:55:00 +0000 (22:55 +0000)]
add test/t-snapshot-merge.sh to provide coverage of snapshot-merge support

14 years agoRemove mknod() and add FIXMEs.
Alasdair Kergon [Tue, 19 Jan 2010 18:21:03 +0000 (18:21 +0000)]
Remove mknod() and add FIXMEs.
In the udev-world, this function should work differently.

14 years agoremove more compiler warnings
Alasdair Kergon [Tue, 19 Jan 2010 17:24:29 +0000 (17:24 +0000)]
remove more compiler warnings
add FIXMEs for incomplete write()s

14 years agotest/t-topology-support.sh requires scsi_debug from >= 2.6.31
Mike Snitzer [Tue, 19 Jan 2010 17:06:50 +0000 (17:06 +0000)]
test/t-topology-support.sh requires scsi_debug from >= 2.6.31

14 years agoremove no-longer-used header
Alasdair Kergon [Tue, 19 Jan 2010 17:04:05 +0000 (17:04 +0000)]
remove no-longer-used header

14 years agoremove no-longer-used files
Alasdair Kergon [Tue, 19 Jan 2010 17:01:17 +0000 (17:01 +0000)]
remove no-longer-used files

14 years agoAdd a common way to establish a scsi_debug-based 4K drive for use by an
Mike Snitzer [Tue, 19 Jan 2010 16:44:57 +0000 (16:44 +0000)]
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.

14 years agoupdate test/t-pvcreate-operation-md.sh attempt loading raid0.ko if raid0
Mike Snitzer [Tue, 19 Jan 2010 15:59:34 +0000 (15:59 +0000)]
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).

14 years agoSignal handling FIXMEs.
Alasdair Kergon [Tue, 19 Jan 2010 15:58:45 +0000 (15:58 +0000)]
Signal handling FIXMEs.
A few integer type changes.

14 years agoNever scan suspended devices in clvmd.
Milan Broz [Tue, 19 Jan 2010 13:25:00 +0000 (13:25 +0000)]
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).

14 years agoAnd more fixes for cmirror build.
Alasdair Kergon [Tue, 19 Jan 2010 02:04:33 +0000 (02:04 +0000)]
And more fixes for cmirror build.

14 years agomore build fixes
Alasdair Kergon [Tue, 19 Jan 2010 01:10:46 +0000 (01:10 +0000)]
more build fixes

14 years agoClean up include files.
Alasdair Kergon [Mon, 18 Jan 2010 21:07:24 +0000 (21:07 +0000)]
Clean up include files.

14 years agoFix some compiler warnings.
Jonathan Earl Brassow [Mon, 18 Jan 2010 20:58:50 +0000 (20:58 +0000)]
Fix some compiler warnings.

14 years agoMisc compilation clean-ups.
Alasdair Kergon [Mon, 18 Jan 2010 20:08:44 +0000 (20:08 +0000)]
Misc compilation clean-ups.

14 years agoChange dev_manager_mirror_percent()'s 'struct logical_volume *' to be
Mike Snitzer [Fri, 15 Jan 2010 22:58:25 +0000 (22:58 +0000)]
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."

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