1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
Peter Rajnoha 48df36b8c5 activation: check for open count with a timeout before removal/deactivation of an LV
This patch reinstates the lv_info call to check for open count of
the LV we're removing/deactivating - this was changed with commit 125712b
some time ago and we relied on the ioctl retry logic deeper in the libdm
while calling the exact 'remove' ioctl.

However, there are still some situations in which it's still required to
check for open count before we do any 'remove' actions - this mainly
applies to LVs which consist of several sub LVs, like it is for
virtual snapshot devices.

The commit 1146691 fixed the issue with ordering of actions during
virtual snapshot removal while the snapshot is still open. But
the check for the open status of the snapshot is still prone to
marking the snapshot as in use with an immediate exit even though
this could be a temporary asynchronous open only, most notably
because of udev and its WATCH udev rule with accompanying scans
for the event which is asynchronous. The situation where this crops
up most often is when we're closing the LV that was open for read-write
and then calling lvremove immediately.

This patch reinstates the original lv_info call for the open status
of the LV in the lv_check_not_in_use fn that gets called before
we do any LV removal/deactivation. In addition to original logic,
this patch adds its own retry loop with a delay (25x0.2 seconds)
besides the existing ioctl retry loop.
2013-10-15 12:44:42 +02:00
..
activate activation: check for open count with a timeout before removal/deactivation of an LV 2013-10-15 12:44:42 +02:00
cache metadata: Fix metadata repair paths when lvmetad is used. 2013-10-09 14:44:01 +02:00
commands cmdline: Add --ignoreskippedcluster. 2013-10-01 21:20:10 +01:00
config release 2.02.103 2013-10-04 14:32:23 +01:00
datastruct Switch to return void 2012-02-08 12:52:58 +00:00
device filters: Add NVM Express (nvme). 2013-10-09 20:08:07 +01:00
display display: fix units for sizes <1k 2013-07-18 17:55:58 +01:00
error cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
filters filter-mpath: remove superfluous error message about mpath major not equal to dm major 2013-08-21 14:07:01 +02:00
format1 cleanup: drop unused headers 2013-06-16 00:07:32 +02:00
format_pool cleanup: drop unused headers 2013-06-16 00:07:32 +02:00
format_text metadata: add INTERNAL_ERROR to "Metadata inconsistency" msg 2013-10-10 13:34:43 +02:00
freeseg cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
label logging: classify log_debug messages 2013-01-07 22:30:29 +00:00
locking activation: add support for flagging an LV to skip udev scanning during activation 2013-10-08 13:43:14 +02:00
log logging: tidy log_sys_error when string empty 2013-08-12 18:40:41 +01:00
metadata RAID: Report RAID images split with tracking as out-of-sync ("I"). 2013-10-14 10:48:44 -05:00
mirror config: add profile arg to find_config_tree_str 2013-07-02 15:19:09 +02:00
misc fix: some issues reported by coverity 2013-08-15 12:23:49 +02:00
mm config: add profile arg to find_config_tree_bool 2013-07-02 15:19:09 +02:00
properties lvm2app: Add thin and thin pool lv creation 2013-07-12 16:52:16 -05:00
raid fix: also make commit b4637 work without dmeventd 2013-09-30 08:17:56 +02:00
replicator cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
report lvs: Add seg_size_pe field. 2013-09-23 21:50:14 +01:00
snapshot snapshot: rework parsing of snapshot metadata 2013-10-14 00:26:58 +02:00
striped Add activation/use_linear_target enabled by default. (prajnoha) 2011-11-28 20:37:51 +00:00
thin fix: also make commit b4637 work without dmeventd 2013-09-30 08:17:56 +02:00
unknown cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
uuid Revert the #include changes. Need to fix this at the #include site for now, and 2011-07-18 14:34:33 +00:00
zero cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
Makefile.in filters: check for mpath before opening devs 2013-08-13 23:26:58 +01:00