]> sourceware.org Git - lvm2.git/commit - lib/activate/activate.c
Replace open_count check with holders/mounted_fs check on lvremove path.
authorPeter Rajnoha <prajnoha@redhat.com>
Thu, 22 Sep 2011 17:33:50 +0000 (17:33 +0000)
committerPeter Rajnoha <prajnoha@redhat.com>
Thu, 22 Sep 2011 17:33:50 +0000 (17:33 +0000)
commit125712bea0a368a6cad1d358d503ae3e7b309927
tree6d0c6aa6797f8c8e7cfbd8fc80a1e22f6f3d8aa0
parent14254bd0be6b4979c4a2d90d4b12e70af0a61396
Replace open_count check with holders/mounted_fs check on lvremove path.

Before, we used to display "Can't remove open logical volume" which was
generic. There 3 possibilities of how a device could be opened:
  - used by another device
  - having a filesystem on that device which is mounted
  - opened directly by an application

With the help of sysfs info, we can distinguish the first two situations.
The third one will be subject to "remove retry" logic - if it's opened
quickly (e.g. a parallel scan from within a udev rule run), this will
finish quickly and we can remove it once it has finished. If it's a
legitimate application that keeps the device opened, we'll do our best
to remove the device, but we will fail finally after a few retries.
WHATS_NEW
lib/activate/activate.c
lib/activate/activate.h
lib/commands/toolcontext.c
lib/metadata/lv_manip.c
libdm/libdm-deptree.c
This page took 0.030719 seconds and 5 git commands to generate.