]> sourceware.org Git - lvm2.git/log
lvm2.git
14 years agoResume volumes in reverse order to preserve memlock pairing.
Milan Broz [Tue, 5 Jan 2010 15:58:11 +0000 (15:58 +0000)]
Resume volumes in reverse order to preserve memlock pairing.

If renaming snapshot with virtual origin, the origin is renamed too.
But the code must resume LVs in reverse order to properly
pair memlock (in cluster locking).

(The resume of snapshot resumes origin too and later resume
is ignored otherwise.)

14 years agoFix previous vgcreate commit to not call unpaired unlock.
Milan Broz [Mon, 28 Dec 2009 18:34:45 +0000 (18:34 +0000)]
Fix previous vgcreate commit to not call unpaired unlock.

14 years agoExplicitly use non-clustered vgcreate in test.
Milan Broz [Mon, 28 Dec 2009 18:33:04 +0000 (18:33 +0000)]
Explicitly use non-clustered vgcreate in test.
(So the tests can run under cluster locking and do not require
cluster mirror or snapshots.)

Add vgscan before block device readahead change
(flush long running process - clvmd - dev cache.)

14 years agoDrop metadata cache after device was autorepaired and removed from VG.
Milan Broz [Fri, 18 Dec 2009 12:45:41 +0000 (12:45 +0000)]
Drop metadata cache after device was autorepaired and removed from VG.

All long running processes must reload metadata when some
device becomes orphan after repair.

14 years agoRemove missing flag if PV reappeared and is empty.
Milan Broz [Fri, 18 Dec 2009 12:44:20 +0000 (12:44 +0000)]
Remove missing flag if PV reappeared and is empty.

When PV device reappears with old metadata, it is
always updated to new version byt atutomatic metadata
repair.

Remove missing flag if device is empty.

If device contains allocated extents, issue warning that
user must remove volumes and re-add this PV before
manipulating with this volume.

This partially solves bug 547842 when one PV (log) is failed,
dmeventd removes that device and later this device reappears and
is wrongly added into VG marked missing.

14 years agoRevert another unintended change that snuck in.
Petr Rockai [Thu, 17 Dec 2009 15:59:53 +0000 (15:59 +0000)]
Revert another unintended change that snuck in.

14 years agoFix removal of multiple devices from a mirror (+ regression test).
Petr Rockai [Thu, 17 Dec 2009 15:38:29 +0000 (15:38 +0000)]
Fix removal of multiple devices from a mirror (+ regression test).

14 years agoAlso clean up MISSING devices in --removemissing --force in vgreduce.
Petr Rockai [Thu, 17 Dec 2009 13:54:46 +0000 (13:54 +0000)]
Also clean up MISSING devices in --removemissing --force in vgreduce.

14 years agoRevert unintended change that slipped in with last checkin.
Petr Rockai [Wed, 16 Dec 2009 19:26:20 +0000 (19:26 +0000)]
Revert unintended change that slipped in with last checkin.

14 years ago#define an INTERNAL_ERROR macro and use it throughout LVM.
Petr Rockai [Wed, 16 Dec 2009 19:22:11 +0000 (19:22 +0000)]
#define an INTERNAL_ERROR macro and use it throughout LVM.

14 years agoCleanup returns for void functions.
Zdenek Kabelac [Fri, 11 Dec 2009 13:16:37 +0000 (13:16 +0000)]
Cleanup returns for void functions.

14 years agoDestroy allocated mempool in _vg_read_orphans() error path.
Zdenek Kabelac [Fri, 11 Dec 2009 13:14:44 +0000 (13:14 +0000)]
Destroy allocated mempool in _vg_read_orphans() error path.

14 years agoFix unlocking vg in some pvresize and toollib error paths.
Zdenek Kabelac [Fri, 11 Dec 2009 13:11:56 +0000 (13:11 +0000)]
Fix unlocking vg in some pvresize and toollib error paths.

14 years agoFix coredump and memory leak for 'dmsetup help -c'
Zdenek Kabelac [Fri, 11 Dec 2009 13:04:30 +0000 (13:04 +0000)]
Fix coredump and memory leak for 'dmsetup help -c'

14 years agos/=/==/ Typo was causing sub test to always return success.
Jonathan Earl Brassow [Thu, 10 Dec 2009 22:06:15 +0000 (22:06 +0000)]
s/=/==/  Typo was causing sub test to always return success.

14 years agoCall explicitly suspend for temporary mirror layer.
Milan Broz [Wed, 9 Dec 2009 19:53:39 +0000 (19:53 +0000)]
Call explicitly suspend for temporary mirror layer.

The memlock_inc() fix is wrong, memlock count is not
propagated to long living process (clvmd) and just
it underflow there.
Also suspend is needed to pre-load precommited metadata
on other nodes (remapping to error taget in this case).

With explicit suspend we generate lock request and code
can update memlock count.

(Infinitely "locked" memory caused that fs_unlock() was not
called properly and on cluster nodes remains
old links in /dev/mapper for not active devices.)

(N.B. failing of suspend call here is not handled as fatal
error - the LV is going to be removed later anyway.)

14 years agoUse more descriptive variable name for temporary layer lv.
Milan Broz [Wed, 9 Dec 2009 19:43:39 +0000 (19:43 +0000)]
Use more descriptive variable name for temporary layer lv.

14 years agoFix missing include.
Milan Broz [Wed, 9 Dec 2009 19:30:56 +0000 (19:30 +0000)]
Fix missing include.

14 years agoAllow manipulation with precommited metadata even when a PV is missing.
Milan Broz [Wed, 9 Dec 2009 19:29:04 +0000 (19:29 +0000)]
Allow manipulation with precommited metadata even when a PV is missing.

The new recovery code first tries to repair LV and then removes failed PV
from VG. It means that during operation there can be VG with PV missing,
and vg_read code handles it like not consistent VG.

We already allows returning "inconsistent" commited metadata,
for mirror repair we need this for precommited too.
(The suspend call prepares precommited metadata to inactive table on
other cluster nodes.)

"Inconsistent" here means - correct metadata, just with some metadata areas
not found (obviously on missing or failed PVs).

14 years agoAdd memlock information to do_lock_lv debug output.
Milan Broz [Wed, 9 Dec 2009 19:01:27 +0000 (19:01 +0000)]
Add memlock information to do_lock_lv debug output.

This helps a lot to detect that something strange happened.

14 years agoNever ever use distributed lock for LV in non-clustered VG.
Milan Broz [Wed, 9 Dec 2009 19:00:16 +0000 (19:00 +0000)]
Never ever use distributed lock for LV in non-clustered VG.

The LV locks make sense only for clustered LVs.

Properly check cluster flag and never issue cluster lock here.

There are several places in code, where it is already checked, this
patch add this check to all needed calls.

In previous code the lock behaviour was inconsistent,
for example, the pre/post callback can take lock even for local volume,
but deactivate call do not released this lock and it remains held forever.

The local LV lock request now just let run the underlying activation code
on local node, the same process like in local locking.

(Again, this is important for new mirror repair calls, here for local
mirrors but with cluster locking enabled.)

14 years agoAllow implicit lock conversion for pre/post callbacks.
Milan Broz [Wed, 9 Dec 2009 18:55:53 +0000 (18:55 +0000)]
Allow implicit lock conversion for pre/post callbacks.

This is unnoticed regression from commit 31672ff60e405795cad70d6d7888ac011f5373ce

The pre/post callback need to convert lock always, local node
is going to modify metadata in this case, it it fails conversion,
the call is ignored.

Also it fixes bug when the lock is not yet held, we cannot set LKF_CONVERT
in this case, it will fail because this lock do not exist.

Note that the automatic conversion is still disabled in activate
call, so the original fix (reactivation of exlusive LV) should
be still in place.

14 years agoAllow implicit "convert" to the same lock mode.
Milan Broz [Wed, 9 Dec 2009 18:45:12 +0000 (18:45 +0000)]
Allow implicit "convert" to the same lock mode.

(Code already not fail if unlocking not locked resource.)

This is needed in pre/post lock_lv call, where we can
request the same lock on local node becuase of suspend call.

14 years agoGet rid of magic masks in cluster locking code - clvmd part.
Milan Broz [Wed, 9 Dec 2009 18:42:02 +0000 (18:42 +0000)]
Get rid of magic masks in cluster locking code - clvmd part.

- do_command and lock_vg expect flags (no change here)

Bug fixes:
- lock_vg should check for NONBLOCK on lock_cmd, flags have this bit masked-out

- do_pre/post_command expect do not mask flag at all, this causes that
the code inside is never run! (see following patches, these functions
expect plain command without flags)

14 years agoGet rid of magic masks in cluster locking code.
Milan Broz [Wed, 9 Dec 2009 18:28:27 +0000 (18:28 +0000)]
Get rid of magic masks in cluster locking code.

Patch should not cause any problems, only real change is
removing LCK_LOCAL bit from lock type flag, it is never used there.
(LCK_LOCAL is part arg[1] bits anyway.)

14 years agoGet rid of hardcoded 0xffdf cluster lock flag.
Milan Broz [Wed, 9 Dec 2009 18:16:38 +0000 (18:16 +0000)]
Get rid of hardcoded 0xffdf cluster lock flag.

There is hidded change - the upper flags (0xffff0000)
and now not cleared, but there are unused anyway.

14 years agoRemove newly created log volume if initial deactivation fails.
Milan Broz [Wed, 9 Dec 2009 18:09:52 +0000 (18:09 +0000)]
Remove newly created log volume if initial deactivation fails.

If there is problem deactivate LV and
_init_mirror_log is called with remove_on_failure = 1,
remove the newly created log LV from metadata.

(This can happen if there is active device with the same name
but different UUID.)

The main reason for this "workaround" patch is to
 - do not keep _mlog volume in metadata, so user can repeat the action
 - print better error message describing the real problem

# lvcreate -m 2 -n lv1 -l 1 --nosync vg_bar
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
  /dev/vg_bar/lv1_mlog: not found: device not cleared
  Aborting. Failed to wipe mirror log.
  Error locking on node bar-01: Input/output error
  Unable to deactivate mirror log LV. Manual intervention required.
  Failed to create mirror log.

# lvcreate -m 2 -n lv1 -l 1 --nosync vg_bar
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
  Aborting. Unable to deactivate mirror log.
  Failed to initialise mirror log.

14 years agoFix activated/deactivated log_verbose message
Dave Wysochanski [Mon, 7 Dec 2009 19:32:28 +0000 (19:32 +0000)]
Fix activated/deactivated log_verbose message

I see "Deactivated" message when I activate and "Activated" message when
I deactivate.  The code uses "activate" as boolean but it can be any one
of the enum values from CHANGE_AY, CHANGE_AN, CHANGE_AE, etc.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoDisable udev rules on change event with DISK_RO=1.
Peter Rajnoha [Mon, 7 Dec 2009 12:03:47 +0000 (12:03 +0000)]
Disable udev rules on change event with DISK_RO=1.

There's a new change udev event generated since kernel 2.6.32 that
notifies userspace about a change in read-only attribute for block
devices (with DISK_RO=1 environment variable set).

We need to detect this and disable the rule application so the
meaning of this change event is not interchanged with the regular
change event used while resuming/renaming DM devices.

If there's anybody awaiting this notification in foreign rules,
he can still check for this env var and do the appropriate actions
separately.

14 years agoUpdate a few more uint64_t's related to the 64-bit status change.
Dave Wysochanski [Fri, 4 Dec 2009 17:48:32 +0000 (17:48 +0000)]
Update a few more uint64_t's related to the 64-bit status change.

At this point they probably do not matter but going forward they
may - depends on future patches for replicator, etc.  I think
these probably got missed because they were 'flags' so I changed
the name to 'status' to be consistent.  So the on-disk
things 'flags' and the in structure 'status' (bits).
NOTE: WHATS_NEW already has entry for this in current release.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
14 years agoWHATS_NEW for previous commit.
Peter Rajnoha [Fri, 4 Dec 2009 14:26:22 +0000 (14:26 +0000)]
WHATS_NEW for previous commit.

14 years agoGive better message for pvmove when all data on source PV is skipped.
Peter Rajnoha [Fri, 4 Dec 2009 14:03:18 +0000 (14:03 +0000)]
Give better message for pvmove when all data on source PV is skipped.

14 years agoFix memory lock imbalance in lv_suspend if already suspended.
Milan Broz [Thu, 3 Dec 2009 19:23:40 +0000 (19:23 +0000)]
Fix memory lock imbalance in lv_suspend if already suspended.

pvmove suspends all moved LVs + pvmoveX mirrored LV itself.

This suspends even underlying pvmoveX and following explicit
suspend call is just noop.

But in resume the pvmoveX volume is no longer underlying
device for moved LVs, so it performs full resume with memlock
decrease.

Code must call memlock_inc() if suspend is requested, volume
is already suspended and error is not requested.

14 years agoFix pvmove test mode to not fail and do not poll.
Milan Broz [Thu, 3 Dec 2009 19:22:24 +0000 (19:22 +0000)]
Fix pvmove test mode to not fail and do not poll.

Test mode should not fail nor try to poll non-existent devices.

14 years agoPrint error if VG already exist.
Milan Broz [Thu, 3 Dec 2009 19:20:48 +0000 (19:20 +0000)]
Print error if VG already exist.

This test have to be moved because of new vg read error handling.

14 years agoFix tools to report error when stopped by user.
Milan Broz [Thu, 3 Dec 2009 19:18:33 +0000 (19:18 +0000)]
Fix tools to report error when stopped by user.

(And do not produce internal error message.)

14 years agominor indent change
Zdenek Kabelac [Thu, 3 Dec 2009 10:01:30 +0000 (10:01 +0000)]
minor indent change

14 years agoskip cast from (void*)
Zdenek Kabelac [Thu, 3 Dec 2009 09:59:54 +0000 (09:59 +0000)]
skip cast from (void*)

14 years agominor whitespace indentation
Zdenek Kabelac [Thu, 3 Dec 2009 09:58:30 +0000 (09:58 +0000)]
minor whitespace indentation

14 years agoAdd tests to check for readahead value in lvcreate.
Dave Wysochanski [Thu, 3 Dec 2009 01:48:05 +0000 (01:48 +0000)]
Add tests to check for readahead value in lvcreate.

14 years agoFix setting of readahead in lvcreate.
Dave Wysochanski [Thu, 3 Dec 2009 01:47:33 +0000 (01:47 +0000)]
Fix setting of readahead in lvcreate.

The default comes from the configuration settings, with possible
commandline override.

14 years agoFix memory leak in lv_info_by_lvid
Milan Broz [Tue, 1 Dec 2009 19:10:23 +0000 (19:10 +0000)]
Fix memory leak in lv_info_by_lvid

The lv_from_lvid calls internally vg_read(),
we must release vg structure afterwards.

Code is called only from clvmd.

14 years agoIf aborting due to an internal error, always print the message causing this.
Petr Rockai [Tue, 1 Dec 2009 13:54:27 +0000 (13:54 +0000)]
If aborting due to an internal error, always print the message causing this.

14 years agoOptionally abort on internal errors (and leverage this option in the
Petr Rockai [Mon, 30 Nov 2009 17:17:11 +0000 (17:17 +0000)]
Optionally abort on internal errors (and leverage this option in the
testsuite). (This is showing a problem in the pvmove test for me, so I expect
the tests to start failing -- this needs to be fixed separately though.)

14 years agoThe sourcedir instances of the test scripts are not PHONY.
Petr Rockai [Mon, 30 Nov 2009 16:58:53 +0000 (16:58 +0000)]
The sourcedir instances of the test scripts are not PHONY.

14 years agoDon't fail in the builddir == srcdir case, though. (testsuite)
Petr Rockai [Mon, 30 Nov 2009 16:56:42 +0000 (16:56 +0000)]
Don't fail in the builddir == srcdir case, though. (testsuite)

14 years agoFix test/api to work with srcdir != builddir.
Petr Rockai [Mon, 30 Nov 2009 15:12:34 +0000 (15:12 +0000)]
Fix test/api to work with srcdir != builddir.

14 years agoMore fixes for the testsuite in the $(builddir) != $(srcdir) situation.
Petr Rockai [Mon, 30 Nov 2009 14:59:26 +0000 (14:59 +0000)]
More fixes for the testsuite in the $(builddir) != $(srcdir) situation.

14 years agoDo not allow creating mirrors of more than 8 images.
Milan Broz [Fri, 27 Nov 2009 14:35:38 +0000 (14:35 +0000)]
Do not allow creating mirrors of more than 8 images.

This is kernel limitation in all kernel versions,
so better detect this early.

14 years agoUse locking_type 3 (compiled in cluster locking) in lvmconf.
Milan Broz [Fri, 27 Nov 2009 14:32:16 +0000 (14:32 +0000)]
Use locking_type 3 (compiled in cluster locking) in lvmconf.

14 years agoRemove unnecessary / duplicate dm_list macros and functions.
Dave Wysochanski [Wed, 25 Nov 2009 20:44:07 +0000 (20:44 +0000)]
Remove unnecessary / duplicate dm_list macros and functions.

These are no longer used by anyone.  The dm_list defines are all in
libdevmapper.h and libdm/datastruct/list.c contains any function definitions.
There is some code in "old-tests" that still use this but this code is not
being maintained.

Thanks to Zdenek for spotting this.

14 years agoLog failure type and recognise type 'F' (flush) in dmeventd mirror plugin.
Alasdair Kergon [Wed, 25 Nov 2009 15:59:07 +0000 (15:59 +0000)]
Log failure type and recognise type 'F' (flush) in dmeventd mirror plugin.

14 years agoSwitch status from 32-bit to 64-bit
Mike Snitzer [Tue, 24 Nov 2009 22:55:55 +0000 (22:55 +0000)]
Switch status from 32-bit to 64-bit

The physical_volume, volume_group, logical_volume and lv_segment
structures' 'status' member is now uint64_t.

The alignment of these structures was also audited to remove holes.  The
movement of some members in 'volume_group' and 'lv_segment' eliminates
holes.  The 'physical_volume' structure still has one 4-byte hole after
'pe_size'; the other structures no longer have any holes.  Each
structures' size has not changed.

14 years agoPost-release.
Alasdair Kergon [Tue, 24 Nov 2009 19:04:23 +0000 (19:04 +0000)]
Post-release.
Fingers crossed this one's more successful that the last one!

14 years ago.
Alasdair Kergon [Tue, 24 Nov 2009 18:54:23 +0000 (18:54 +0000)]
.

14 years agopre-release
Alasdair Kergon [Tue, 24 Nov 2009 18:26:08 +0000 (18:26 +0000)]
pre-release

14 years agoAdd missing vg_release to pvs and pvdisplay to fix memory leak.
Milan Broz [Tue, 24 Nov 2009 17:07:09 +0000 (17:07 +0000)]
Add missing vg_release to pvs and pvdisplay to fix memory leak.

14 years agoDo not try to unlock VG which is not locked.
Milan Broz [Tue, 24 Nov 2009 16:13:02 +0000 (16:13 +0000)]
Do not try to unlock VG which is not locked.

If the vg_read() returned error, no lock was taken,
so always call vg_release().

Otherwise this can happen because of missing FAILED_*:

# vgchange -a y x --ignorelockingfailure
  Volume group "x" not found
  Internal error: Attempt to unlock unlocked VG x

14 years agoMove persistent filter dump to more appropriate place.
Milan Broz [Tue, 24 Nov 2009 16:11:37 +0000 (16:11 +0000)]
Move persistent filter dump to more appropriate place.

After context_refresh is cache empty, the cache flush
does nothing.

Call it after lvmcache full rescan if running from
log lived process.

14 years agoRefresh device filters before full device rescan in lvmcache.
Milan Broz [Tue, 24 Nov 2009 16:10:25 +0000 (16:10 +0000)]
Refresh device filters before full device rescan in lvmcache.

The sysfs filter initialise hash of available devices using
scan of /sys/block. We need to refresh even this hash
when performing full scan otherwise the newly appeared
device could be rejected, because there is no entry
in sysfs filter.

This easily could happen when attaching new device
to cluster node. (Only force refresh of context
in clvmd -R works here now).

Unfortunately consequences of this are much worse,
missing device part on that node is replaced with missing segment
(even when no partial arg is selected) and this directly
lead to data corruption.

See https://bugzilla.redhat.com/show_bug.cgi?id=538515

Simply fix it by refreshing device filters in lvmcache
before performing the full device scan.

14 years agoReturn error status if vgchange fails to activate some volume.
Milan Broz [Tue, 24 Nov 2009 16:08:49 +0000 (16:08 +0000)]
Return error status if vgchange fails to activate some volume.

(on one node a storage connection failed):

# vgchange -a y vg_bar ; echo $?
  Error locking on node bar-02: Refusing activation of partial LV lv1. Use --partial to override.
    1 logical volume(s) in volume group "vg_bar" now active
    0

So activation fails on one node, error is correctly printed but
status code is wrong.

This patch fixes the top level (vgchange) to return proper code
(and print # of activated LVs).

(lvchange returns error properly here.)

14 years agoFix memory lock imbalance in locking code.
Milan Broz [Mon, 23 Nov 2009 10:55:14 +0000 (10:55 +0000)]
Fix memory lock imbalance in locking code.

(This affects only cluster locking because only cluster
locking module set LCK_PRE_MEMLOCK.)

With currect code you get
# vgchange -a n
  Internal error: _memlock_count has dropped below 0.
when using cluster locking.

It is caused by _unlock_memory calls here

  if ((flags & (LCK_SCOPE_MASK | LCK_TYPE_MASK)) == LCK_LV_RESUME)
     memlock_dec();

Unfortunately it is also (wrongly) called in immediate unlock
(when LCK_HOLD is not set) from lock_vol
(LCK_UNLOCK is misinterpreted as LCK_LV_RESUME).

Avoid this by comparing original flags and provide memlock
code type of operation (suspend/resume).

14 years agoRevert vg_read_internal change, clvmd cannot use vg_read now. (2.02.55)
Milan Broz [Mon, 23 Nov 2009 10:44:50 +0000 (10:44 +0000)]
Revert vg_read_internal change, clvmd cannot use vg_read now. (2.02.55)

15 years agopost-release
Alasdair Kergon [Thu, 19 Nov 2009 19:53:58 +0000 (19:53 +0000)]
post-release

15 years ago.
Alasdair Kergon [Thu, 19 Nov 2009 19:42:57 +0000 (19:42 +0000)]
.

15 years agopre-release
Alasdair Kergon [Thu, 19 Nov 2009 19:00:34 +0000 (19:00 +0000)]
pre-release

15 years agoAdd a basic test for snapshots of mirrors, thanks to Jon Brassow.
Petr Rockai [Thu, 19 Nov 2009 13:55:40 +0000 (13:55 +0000)]
Add a basic test for snapshots of mirrors, thanks to Jon Brassow.

15 years agoIn case we refuse to continue due to missing PVs, print a hint about using
Petr Rockai [Thu, 19 Nov 2009 13:44:37 +0000 (13:44 +0000)]
In case we refuse to continue due to missing PVs, print a hint about using
vgreduce --removemissing to remedy the situation.

15 years agoThe double resume in remove_mirror_images does not happen *always*. Only call
Petr Rockai [Thu, 19 Nov 2009 13:42:38 +0000 (13:42 +0000)]
The double resume in remove_mirror_images does not happen *always*. Only call
memlock_inc() when it actually does happen.

15 years agoUn-export vg_read_internal.
Petr Rockai [Thu, 19 Nov 2009 12:13:37 +0000 (12:13 +0000)]
Un-export vg_read_internal.

15 years agoAdd a missing #include (fix compiler warning).
Petr Rockai [Thu, 19 Nov 2009 12:09:53 +0000 (12:09 +0000)]
Add a missing #include (fix compiler warning).

15 years agoFix the dmeventd LD_LIBRARY_PATH in the testsuite.
Petr Rockai [Thu, 19 Nov 2009 12:01:39 +0000 (12:01 +0000)]
Fix the dmeventd LD_LIBRARY_PATH in the testsuite.

15 years agoWhat's new.
Petr Rockai [Thu, 19 Nov 2009 01:17:01 +0000 (01:17 +0000)]
What's new.

15 years agoFix another bug in memlock handling, this time the "global" dmeventd memlock
Petr Rockai [Thu, 19 Nov 2009 01:11:57 +0000 (01:11 +0000)]
Fix another bug in memlock handling, this time the "global" dmeventd memlock
was preventing device scans in lvconvert --repair running from inside dmeventd.

15 years agoAdd an extra memlock_inc() to _remove_mirror_images to properly balance
Petr Rockai [Wed, 18 Nov 2009 18:23:46 +0000 (18:23 +0000)]
Add an extra memlock_inc() to _remove_mirror_images to properly balance
reference counting (see code comment for details).

15 years agoIssue an Internal error message whenever _memlock_count drops below 0.
Petr Rockai [Wed, 18 Nov 2009 18:22:32 +0000 (18:22 +0000)]
Issue an Internal error message whenever _memlock_count drops below 0.

15 years agoNever activate hidden volumes directly in vgchange.
Milan Broz [Wed, 18 Nov 2009 17:20:18 +0000 (17:20 +0000)]
Never activate hidden volumes directly in vgchange.

All hidden (not visible) volumes should be activated through
other visible volumes.

(There are already exceptions like snapshot, mirror log and image,
which should be cleaned one day...)

This solves problems for future types of hidden volumes,
which can have special meaning and must not be activated implicitly
(e.g. key store volume).

15 years agoFix pvmove region_size overflow for very large PVs.
Milan Broz [Wed, 18 Nov 2009 16:48:10 +0000 (16:48 +0000)]
Fix pvmove region_size overflow for very large PVs.

Fixes problem reported in
https://www.redhat.com/archives/dm-devel/2009-November/msg00104.html

The region size multiplication can overflow when using 32bit integer.

15 years agoFix install_device-mapper Makefile target to not build dmeventd plugins.
Milan Broz [Fri, 13 Nov 2009 12:48:01 +0000 (12:48 +0000)]
Fix install_device-mapper Makefile target to not build dmeventd plugins.

15 years agoSupport udev flags even when udev_sync is disabled or not compiled in.
Peter Rajnoha [Fri, 13 Nov 2009 12:43:21 +0000 (12:43 +0000)]
Support udev flags even when udev_sync is disabled or not compiled in.

This provides better support for environments where udev rules are installed
but udev_sync is not compiled in (however, using udev_sync is highly
recommended). It also provides consistent and expected functionality even
when '--noudevsync' option is used.

There is still requirement for kernel >= 2.6.31 for the flags to work though
(it uses DM cookies to pass the flags into the kernel and set them in udev
event environment that we can read in udev rules).

15 years agoRemove 'last_rule' from udev rules.
Peter Rajnoha [Fri, 13 Nov 2009 12:33:27 +0000 (12:33 +0000)]
Remove 'last_rule' from udev rules.

'last_rule' option has been removed from udev (version >= 147).

From now on, we require foreign rules to check and honor
ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG} instead. Foreign
rules should be skipped totally when this flag is set.

15 years ago.
Alasdair Kergon [Fri, 6 Nov 2009 01:40:59 +0000 (01:40 +0000)]
.

15 years agoAdd support for querying a device's inactive table.
Alasdair Kergon [Fri, 6 Nov 2009 00:43:08 +0000 (00:43 +0000)]
Add support for querying a device's inactive table.
Currently this data is invisible to userspace.
Requires dm >= 4.16 (likely to be in linux 2.6.33).

15 years agoFix compilation warning:
Milan Broz [Wed, 4 Nov 2009 14:56:35 +0000 (14:56 +0000)]
Fix compilation warning:
activate/dev_manager.c:362: warning: combined_percent_range may be used uninitialized in this function

15 years agoFix lvcreate processing of %PVS argument.
Milan Broz [Wed, 4 Nov 2009 14:47:27 +0000 (14:47 +0000)]
Fix lvcreate processing of %PVS argument.

- fix missing unlocking of VG
lvcreate -l 100%PVS -n lv1 vg_test
  Please specify physical volume(s) with %PVS
  Internal error: Volume Group vg_test was not unlocked

- if no PVS specified, use all available

Fix segfault if %PVS in lvresize without PVs list.

15 years agominor code comment update
Zdenek Kabelac [Wed, 4 Nov 2009 12:39:56 +0000 (12:39 +0000)]
minor code comment update

15 years agoRemove old, and now incorrect, vgextend man page description of pvcreate options.
Dave Wysochanski [Tue, 3 Nov 2009 15:58:02 +0000 (15:58 +0000)]
Remove old, and now incorrect, vgextend man page description of pvcreate options.

15 years agoTidy some uses of arg_count and introduce arg_is_set.
Alasdair Kergon [Tue, 3 Nov 2009 15:50:42 +0000 (15:50 +0000)]
Tidy some uses of arg_count and introduce arg_is_set.

15 years agoUpdate for outnl and indent functions
Zdenek Kabelac [Tue, 3 Nov 2009 11:17:46 +0000 (11:17 +0000)]
Update for outnl and indent functions

15 years agoExport functions out_inc_indent(), out_dec_indent() for creating
Zdenek Kabelac [Tue, 3 Nov 2009 11:00:46 +0000 (11:00 +0000)]
Export functions out_inc_indent(), out_dec_indent() for creating
indented metadata lines.

Macro outnl() is using exported out_newline() instead of direct
call f->fn(), that required the visibility of the internal
struct formatter.

15 years agoAdd fflush for the case the log is redirected to the buffered file.
Zdenek Kabelac [Tue, 3 Nov 2009 10:50:57 +0000 (10:50 +0000)]
Add fflush for the case the log is redirected to the buffered file.

Without this patch it have not been obvious, why the application
waits on the stdin as the prompt might be still buffered in memory.

15 years agoFix hash lookup segfault when keys compared are different lengths.
Alasdair Kergon [Tue, 3 Nov 2009 00:45:35 +0000 (00:45 +0000)]
Fix hash lookup segfault when keys compared are different lengths.

15 years agoRudimentary support for running testsuite in a builddir != srcdir situation.
Petr Rockai [Mon, 2 Nov 2009 15:16:21 +0000 (15:16 +0000)]
Rudimentary support for running testsuite in a builddir != srcdir situation.

15 years agoRename validate_vg_create_params to vgcreate_params_validate.
Dave Wysochanski [Sun, 1 Nov 2009 20:05:17 +0000 (20:05 +0000)]
Rename validate_vg_create_params to vgcreate_params_validate.

15 years agoRename fill_vg_create_params to vgcreate_params_set_from_args.
Dave Wysochanski [Sun, 1 Nov 2009 20:03:24 +0000 (20:03 +0000)]
Rename fill_vg_create_params to vgcreate_params_set_from_args.

Rename fill_vg_create_params to vgcreate_params_set_from_args and remove
vg_name parameter from function (caller must set before calling function).

15 years agoAdd vgcreate_params_set_defaults().
Dave Wysochanski [Sun, 1 Nov 2009 20:02:32 +0000 (20:02 +0000)]
Add vgcreate_params_set_defaults().

Add function to set default vgcreate parameters based on existing VG or
internal defaults.  Should be no functional change.

15 years agoRename pvcreate_params processing functions to better match <object><action>.
Dave Wysochanski [Sun, 1 Nov 2009 19:51:54 +0000 (19:51 +0000)]
Rename pvcreate_params processing functions to better match <object><action>.

Rename fill_default_pvcreate_params to pvcreate_params_set_defaults.
Rename pvcreate_validate_restore_params to pvcreate_restore_params_validate.
Rename pvcreate_validate_params to pvcreate_params_validate.

15 years agoMore cleanup in udev rules:
Peter Rajnoha [Sun, 1 Nov 2009 18:01:31 +0000 (18:01 +0000)]
More cleanup in udev rules:

 - add copyright notice for 10-dm.rules.in,

 - set DM_UDEV_DISABLE_{DISK, OTHER}_RULES_FLAG in 11-dm-lvm.rules directly
   for inappropriate and non-top-level subdevices in case we use older kernels
   where DM_COOKIE is not used (and therefore there are no flags passed from
   the LVM process itself). This applies for older kernels (version < 2.6.31),

 - remove unnecessary filters in 95-dm-notify.rules - the DM_COOKIE env var
   itself is set for change/remove udev events and for DM devices only so
   there's no need to double-check this.

15 years agoUpdate vgsplit to call vg_set_clustered().
Dave Wysochanski [Sat, 31 Oct 2009 17:43:57 +0000 (17:43 +0000)]
Update vgsplit to call vg_set_clustered().

15 years agoUpdate vgcreate to call vg_set_clustered().
Dave Wysochanski [Sat, 31 Oct 2009 17:39:22 +0000 (17:39 +0000)]
Update vgcreate to call vg_set_clustered().

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