master - lvmetad: set disabled flag in lvmetad if duplicate PVs are found
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9539ee809827a870c88d02cfb2d0dc1e3eaac0d0 Commit: 9539ee809827a870c88d02cfb2d0dc1e3eaac0d0 Parent: a1dbd54885844a934e17f69691d2371a15453033 Author: David Teigland <[email protected]> AuthorDate: Fri Jan 29 12:25:20 2016 -0600 Committer: David Teigland <[email protected]> CommitterDate: Fri May 6 08:59:59 2016 -0500
lvmetad: set disabled flag in lvmetad if duplicate PVs are found
When devices are being scanned, if duplicate PVs are seen, tell lvmetad to set its disabled flag because of duplicate PVs.
--- lib/cache/lvmcache.c | 6 ++ lib/cache/lvmetad.c | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+), 0 deletions(-)
lib/cache/lvmcache.c +6 -0
@@ -27,6 +27,7 @@#include "config.h" #include "lvmetad.h" +#include "lvmetad-client.h" #define CACHE_INVALID 0x00000001#define CACHE_LOCKED 0x00000002
@@ -1840,6 +1841,11 @@ struct lvmcache_info *lvmcache_add(struct labeller *labeller, const char *pvid,* pv->dev under the VG, and its duplicate outside * the VG context.) */ + +if (!_found_duplicate_pvs &&lvmetad_used ()) { +log_warn ("WARNING: Disabling lvmetad cache which does not support duplicate PVs." ); +lvmetad_set_disabled (fmt->cmd,LVMETAD_DISABLE_REASON_DUPLICATES ); + } _found_duplicate_pvs =1 ;/*
lib/cache/lvmetad.c +138 -0
144 lines not on this page · raw message