diff options
author | David Teigland <teigland@redhat.com> | 2016-02-11 16:53:59 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2016-02-25 15:38:03 -0600 |
commit | 7e12ebffc4169b91747f7a49edc07ea2cd971e3a (patch) | |
tree | b630a07743913444d1a5fb7cc751cbbcb33a9b00 | |
parent | 9ce3f363b7c1c2a18f3757553692c1a1988b557a (diff) | |
download | lvm2-dev-dct-lvmetad-disabled-dups-1.tar.gz |
remove unused set_preferred_duplicatesdev-dct-lvmetad-disabled-dups-1
-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 426c03412..436c0cd4b 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -71,7 +71,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; @@ -123,47 +122,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 dafb99b69..6e63240d7 100644 --- a/lib/cache/lvmcache.h +++ b/lib/cache/lvmcache.h @@ -198,8 +198,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); |