mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Return fail if lv_deactivate did not removed device from kernel.
lv_deactivate now returns always success, because tree deactivation functions (see dm_tree_deactivate_children) always returns success. Because code should return failure in lv_deactivate at least, fix it by checking for device existence after real deactivation call. (After discussion this was prefered solution to dm tree function rewrite which affects snapshots and mirrors.)
This commit is contained in:
parent
49ebd19ab1
commit
c0ff3805c8
@ -1,5 +1,6 @@
|
||||
Version 2.02.54 -
|
||||
=====================================
|
||||
Return fail if lv_deactivate fails to remove device from kernel.
|
||||
Provide alternative implementation of obsolete siginterrupt().
|
||||
Consolidate LV allocation into alloc_lv().
|
||||
Treat input units of both 's' and 'S' as 512-byte sectors. (2.02.49)
|
||||
|
@ -1017,6 +1017,8 @@ int lv_deactivate(struct cmd_context *cmd, const char *lvid_s)
|
||||
memlock_dec();
|
||||
fs_unlock();
|
||||
|
||||
if (!lv_info(cmd, lv, &info, 1, 0) || info.exists)
|
||||
r = 0;
|
||||
out:
|
||||
if (lv)
|
||||
vg_release(lv->vg);
|
||||
|
Loading…
Reference in New Issue
Block a user