switch (flags & LCK_SCOPE_MASK) {
case LCK_VG:
- if (!strcmp(resource, VG_SYNC_NAMES))
- fs_unlock();
-
/* LCK_CACHE does not require a real lock */
if (flags & LCK_CACHE)
break;
int sync_local_dev_names(struct cmd_context* cmd)
{
memlock_unlock(cmd);
-
- return lock_vol(cmd, VG_SYNC_NAMES, LCK_VG_SYNC_LOCAL, NULL);
-}
-
-int sync_dev_names(struct cmd_context* cmd)
-{
- memlock_unlock(cmd);
-
- return lock_vol(cmd, VG_SYNC_NAMES, LCK_VG_SYNC, NULL);
+ fs_unlock();
+ return 1;
}
*/
#define VG_ORPHANS "#orphans"
#define VG_GLOBAL "#global"
-#define VG_SYNC_NAMES "#sync_names"
/*
* Common combinations
#define LCK_VG_BACKUP (LCK_VG | LCK_CACHE)
-#define LCK_VG_SYNC (LCK_NONE | LCK_CACHE)
-#define LCK_VG_SYNC_LOCAL (LCK_NONE | LCK_CACHE | LCK_LOCAL)
-
#define LCK_MASK (LCK_TYPE_MASK | LCK_SCOPE_MASK)
#define unlock_vg(cmd, vg, vol) \
do { \
if (vg && !lvmetad_vg_update_finish(vg)) \
stack; \
- if (is_real_vg(vol) && !sync_dev_names(cmd)) \
+ if (is_real_vg(vol) && !sync_local_dev_names(cmd)) \
stack; \
if (!lock_vol(cmd, vol, LCK_VG_UNLOCK, NULL)) \
stack; \
lock_vol((vg)->cmd, (vg)->name, LCK_VG_DROP_CACHE, NULL)
int sync_local_dev_names(struct cmd_context* cmd);
-int sync_dev_names(struct cmd_context* cmd);
/* Process list of LVs */
struct volume_group;