diff options
-rw-r--r-- | lib/cache/lvmcache.c | 42 | ||||
-rw-r--r-- | lib/cache/lvmcache.h | 2 |
2 files changed, 0 insertions, 44 deletions
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index b79cd400f..d8c636d3c 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -69,7 +69,6 @@ struct lvmcache_vginfo { unsigned vg_use_count; /* Counter of vg reusage */ unsigned precommitted; /* Is vgmetadata live or precommitted? */ unsigned cached_vg_invalidated; /* Signal to regenerate cached_vg */ - unsigned preferred_duplicates; /* preferred duplicate pvs have been set */ }; static struct dm_hash_table *_pvid_hash = NULL; @@ -121,47 +120,6 @@ int lvmcache_init(void) return 1; } -/* - * Once PV info has been populated in lvmcache and - * lvmcache has chosen preferred duplicate devices, - * set this flag so that lvmcache will not try to - * compare and choose preferred duplicate devices - * again (which may result in different preferred - * devices.) PV info can be populated in lvmcache - * multiple times, each time causing lvmcache to - * compare the duplicate devices, so we need to - * record that the comparison/preferences have - * already been done, so the preferrences from the - * first time through are not changed. - * - * This is something of a hack to work around the - * fact that the code isn't really designed to - * handle duplicate PVs, and the fact that lvmetad - * has its own way of picking a preferred duplicate - * and lvmcache has another way based on having - * more information than lvmetad does. - * - * If we come up with a better overall method to - * handle duplicate PVs, then this can probably be - * removed. - * - * FIXME: if we want to make lvmetad work with clvmd, - * then this may need to be changed to set - * preferred_duplicates back to 0. - */ - -void lvmcache_set_preferred_duplicates(const char *vgid) -{ - struct lvmcache_vginfo *vginfo; - - if (!(vginfo = lvmcache_vginfo_from_vgid(vgid))) { - stack; - return; - } - - vginfo->preferred_duplicates = 1; -} - void lvmcache_seed_infos_from_lvmetad(struct cmd_context *cmd) { if (!lvmetad_active() || _has_scanned) diff --git a/lib/cache/lvmcache.h b/lib/cache/lvmcache.h index cc2f7092a..d13f00d75 100644 --- a/lib/cache/lvmcache.h +++ b/lib/cache/lvmcache.h @@ -193,8 +193,6 @@ int lvmcache_found_duplicate_pvs(void); int lvmcache_get_unused_duplicate_devs(struct cmd_context *cmd, struct dm_list *head); -void lvmcache_set_preferred_duplicates(const char *vgid); - int vg_has_duplicate_pvs(struct volume_group *vg); int lvmcache_contains_lock_type_sanlock(struct cmd_context *cmd); |