mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Do not check for open_count when not needed.
Disable open_count checking in lv_info it it's not used. Fix previous commit (comment out unsable code for now).
This commit is contained in:
parent
56cab8cc03
commit
401a40d941
@ -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).
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user