]> sourceware.org Git - lvm2.git/commitdiff
Fix incorrect removal of symlinks after LV deactivation fails.
authorAlasdair Kergon <agk@redhat.com>
Wed, 7 Apr 2010 20:04:41 +0000 (20:04 +0000)
committerAlasdair Kergon <agk@redhat.com>
Wed, 7 Apr 2010 20:04:41 +0000 (20:04 +0000)
WHATS_NEW
WHATS_NEW_DM
lib/activate/dev_manager.c
libdm/libdm-deptree.c

index 646cdbbfde335186cfeaacfa2f0b7328c233ea95..bfa1df0d5ff98e48ae9b144d1bffac6162dd8643 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.63 -  
 ================================
+  Fix incorrect removal of symlinks after LV deactivation fails.
   Fix is_partitioned_dev not to attempt to reopen device.
   Fix another thread race in clvmd.
   Refactor management of vg->pvs list.
index 7b5d0a4c387347e88a9c6b4398d9298b6a183634..6142ae0ad6075947c5c384abec0720fed8c729f1 100644 (file)
@@ -1,6 +1,7 @@
 Version 1.02.46 - 
 ================================
-  Wipe memory buffers for dm-ioctl parameters before releaseing.
+  Change dm_tree_deactivate_children to fail if device is open.
+  Wipe memory buffers for dm-ioctl parameters before releasing.
   Strictly require libudev if udev_sync is used.
   Add support for ioctl's DM_UEVENT_GENERATED_FLAG.
 
index 5c5bc440f2643e7efbc8b7fee25246e2d9ba711c..dcd5000b844dc0d8a5d1b86c8de087e4b46f89b5 100644 (file)
@@ -1523,8 +1523,6 @@ int dev_manager_deactivate(struct dev_manager *dm, struct logical_volume *lv)
 
        r = _tree_action(dm, lv, DEACTIVATE);
 
-       fs_del_lv(lv);
-
        return r;
 }
 
index fd3a128136c7c53b5e18ecd2791af8538a85612a..02ab39e75a2c4f4ac1e6c65112c9f7fe481dbbb6 100644 (file)
@@ -1047,9 +1047,14 @@ int dm_tree_deactivate_children(struct dm_tree_node *dnode,
 
                /* Refresh open_count */
                if (!_info_by_dev(dinfo->major, dinfo->minor, 1, &info) ||
-                   !info.exists || info.open_count)
+                   !info.exists)
                        continue;
 
+               if (info.open_count) {
+                       r = 0;
+                       continue;
+               }
+
                if (!_deactivate_node(name, info.major, info.minor,
                                      &child->dtree->cookie, child->udev_flags)) {
                        log_error("Unable to deactivate %s (%" PRIu32
This page took 0.049573 seconds and 5 git commands to generate.