1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

activate: lv_check_not_in_use no check of closed

Don't perform expensive sysfs tests when the device is closed.
(having open_count == 0).
This commit is contained in:
Zdenek Kabelac 2014-09-21 23:07:02 +02:00
parent 392bb6f46e
commit 0f2adcc9ef
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.112 - Version 2.02.112 -
===================================== =====================================
Do not scan sysfs in lv_check_not_in_use() when device is closed.
Backup final metadata after resync of mirror/raid. Backup final metadata after resync of mirror/raid.
Unify handling of --persistent option for lvcreate and lvchange. Unify handling of --persistent option for lvcreate and lvchange.
Validate major and minor numbers stored in metadata. Validate major and minor numbers stored in metadata.

View File

@ -700,7 +700,7 @@ int lv_check_not_in_use(struct cmd_context *cmd, struct logical_volume *lv,
{ {
unsigned int open_count_check_retries; unsigned int open_count_check_retries;
if (!info->exists) if (!info->exists || !info->open_count)
return 1; return 1;
/* If sysfs is not used, use open_count information only. */ /* If sysfs is not used, use open_count information only. */