]> sourceware.org Git - lvm2.git/commitdiff
Do not check for open_count when not needed.
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 3 Feb 2011 01:24:46 +0000 (01:24 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 3 Feb 2011 01:24:46 +0000 (01:24 +0000)
Disable open_count checking in lv_info it it's not used.

Fix previous commit (comment out unsable code for now).

WHATS_NEW
lib/activate/activate.c
lib/activate/fs.c
liblvm/lvm_lv.c
tools/lvconvert.c
tools/lvscan.c

index 18c90febb967557ef51ed860e87965c1e18b1823..129cc9076b0be60b1ba1aa656300c50b61ca3a95 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,7 @@
 Version 2.02.83 - 
 ===================================
+  Remove unneeded checks for open_count in lv_info().
+  Synchronize with udev before checking open_count in lv_info().
   Allow CLVMD_CMD_SYNC_NAMES to be propagated around the cluster if requested.
   Add "dmsetup ls --tree" output to lvmdump.
   Fix udev synchronization with no-locking --sysinit (2.02.80).
index dd40acc060706885308449c10ef2dd31b753deb9..e478c6dff3e9ab1bc2e3acd33e22efcb4ab77534 100644 (file)
@@ -469,7 +469,7 @@ int lv_info(struct cmd_context *cmd, const struct logical_volume *lv, unsigned o
        if (with_open_count) {
                if (locking_is_clustered())
                        sync_local_dev_names(cmd); /* Wait to have udev in sync */
-               else if (fs_has_non_delete_ops())
+               else //if (fs_has_non_delete_ops())
                        fs_unlock(); /* For non clustered - wait if there are non-delete ops */
        }
 
@@ -1219,7 +1219,7 @@ int lv_deactivate(struct cmd_context *cmd, const char *lvid_s)
        r = _lv_deactivate(lv);
        memlock_dec(cmd);
 
-       if (!lv_info(cmd, lv, 0, &info, 1, 0) || info.exists)
+       if (!lv_info(cmd, lv, 0, &info, 0, 0) || info.exists)
                r = 0;
 out:
        if (lv) {
index 373d1599dc452be3656672725eae9f888ce5628a..b8332c438f7f706876d74c8e53f43be89d61e92e 100644 (file)
@@ -423,7 +423,9 @@ void fs_set_cookie(uint32_t cookie)
        _fs_cookie = cookie;
 }
 
+#if 0
 int fs_has_non_delete_ops(void)
 {
        return _other_fs_ops(FS_DEL);
 }
+#endif
index b77f78cd75cbe0d1fd5841a54f4363e6e9954d22..664c39db3264a93f8e0f90c8a72909032f79d7ca 100644 (file)
@@ -62,7 +62,7 @@ struct lvm_property_value lvm_lvseg_get_property(const lvseg_t lvseg,
 uint64_t lvm_lv_is_active(const lv_t lv)
 {
        struct lvinfo info;
-       if (lv_info(lv->vg->cmd, lv, 0, &info, 1, 0) &&
+       if (lv_info(lv->vg->cmd, lv, 0, &info, 0, 0) &&
            info.exists && info.live_table)
                return 1;
        return 0;
@@ -71,7 +71,7 @@ uint64_t lvm_lv_is_active(const lv_t lv)
 uint64_t lvm_lv_is_suspended(const lv_t lv)
 {
        struct lvinfo info;
-       if (lv_info(lv->vg->cmd, lv, 0, &info, 1, 0) &&
+       if (lv_info(lv->vg->cmd, lv, 0, &info, 0, 0) &&
            info.exists && info.suspended)
                return 1;
        return 0;
index 04c9f41a2ec2ae1634705be210ffad7ab1f59916..b35bc81f50f10dba028ff86e87dd039a54edb53d 100644 (file)
@@ -1637,7 +1637,7 @@ static int poll_logical_volume(struct cmd_context *cmd, struct logical_volume *l
 {
        struct lvinfo info;
 
-       if (!lv_info(cmd, lv, 0, &info, 1, 0) || !info.exists) {
+       if (!lv_info(cmd, lv, 0, &info, 0, 0) || !info.exists) {
                log_print("Conversion starts after activation.");
                return ECMD_PROCESSED;
        }
index 1f91d39c9f0589f51bc64e13708c2ef206f67e1e..753b00d54b5522566ad0c8e994c6e8c31300b874 100644 (file)
@@ -28,7 +28,7 @@ static int lvscan_single(struct cmd_context *cmd, struct logical_volume *lv,
        if (!arg_count(cmd, all_ARG) && !lv_is_visible(lv))
                return ECMD_PROCESSED;
 
-       inkernel = lv_info(cmd, lv, 0, &info, 1, 0) && info.exists;
+       inkernel = lv_info(cmd, lv, 0, &info, 0, 0) && info.exists;
        if (lv_is_origin(lv)) {
                dm_list_iterate_items_gen(snap_seg, &lv->snapshot_segs,
                                       origin_list) {
This page took 0.052087 seconds and 5 git commands to generate.