1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Remove unused cache management from locking

This code was for managing lvmcache for clvm
and it no longer does anything.
This commit is contained in:
David Teigland 2018-06-08 12:30:43 -05:00
parent 5e672df6ae
commit a8759dc7a6
4 changed files with 0 additions and 31 deletions

View File

@ -138,7 +138,6 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
#define LCK_VG_READ (LCK_VG | LCK_READ | LCK_HOLD)
#define LCK_VG_WRITE (LCK_VG | LCK_WRITE | LCK_HOLD)
#define LCK_VG_UNLOCK (LCK_VG | LCK_UNLOCK)
#define LCK_VG_DROP_CACHE (LCK_VG | LCK_WRITE | LCK_CACHE)
/* FIXME: LCK_HOLD abused here */
#define LCK_VG_COMMIT (LCK_VG | LCK_WRITE | LCK_CACHE | LCK_HOLD)
@ -163,9 +162,6 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
release_vg(vg); \
} while (0)
#define drop_cached_metadata(vg) \
lock_vol((vg)->cmd, (vg)->name, LCK_VG_DROP_CACHE, NULL)
int sync_local_dev_names(struct cmd_context* cmd);
/* Process list of LVs */

View File

@ -2915,11 +2915,6 @@ int vg_write(struct volume_group *vg)
return 0;
}
if (!drop_cached_metadata(vg)) {
log_error("Unable to drop cached metadata for VG %s.", vg->name);
return 0;
}
if (critical_section())
log_error(INTERNAL_ERROR
"Writing metadata in critical section.");
@ -3077,11 +3072,6 @@ int vg_commit(struct volume_group *vg)
_vg_move_cached_precommitted_to_committed(vg);
}
/* If update failed, remove any cached precommitted metadata. */
if (!cache_updated && !drop_cached_metadata(vg))
log_error("Attempt to drop cached metadata failed "
"after commit for VG %s.", vg->name);
/* If at least one mda commit succeeded, it was committed */
return cache_updated;
}
@ -3115,10 +3105,6 @@ void vg_revert(struct volume_group *vg)
stack;
}
}
if (!drop_cached_metadata(vg))
log_error("Attempt to drop cached metadata failed "
"after reverted update for VG %s.", vg->name);
}
static int _check_mda_in_use(struct metadata_area *mda, void *_in_use)
@ -3543,12 +3529,6 @@ static int _wipe_outdated_pvs(struct cmd_context *cmd, struct volume_group *vg,
pv_dev_name(pvl->pv), uuid, vg->name);
if (!pv_write_orphan(cmd, pvl->pv))
return_0;
/* Refresh metadata after orphan write */
if (!drop_cached_metadata(vg)) {
log_error("Unable to drop cached metadata for VG %s while wiping outdated PVs.", vg->name);
return 0;
}
next_pv:
;
}

View File

@ -103,9 +103,6 @@ static int _vgmerge_single(struct cmd_context *cmd, const char *vg_name_to,
if (!archive(vg_from) || !archive(vg_to))
goto_bad;
if (!drop_cached_metadata(vg_from))
stack;
if (!_vgmerge_select_pool_metadata_spare(cmd, vg_to, vg_from))
goto_bad;

View File

@ -108,10 +108,6 @@ static int _vgrename_single(struct cmd_context *cmd, const char *vg_name,
if (!archive(vg))
goto error;
/* Remove references based on old name */
if (!drop_cached_metadata(vg))
stack;
if (!lockd_rename_vg_before(cmd, vg)) {
stack;
goto error;