From 4e7c9c0e627d9814f0502488fb830fc47b6a71e0 Mon Sep 17 00:00:00 2001
Date: Wed, 11 Sep 2019 01:35:09 +0800
Subject: [PATCH] lvm2: revert to use label_read in lvmetad_pvscan_single

reason: In e3e5beec74ac0037917f5e9a2693c6ccb16debac of stable-2.02
branch, it reduce scan disk.It may lead to the metadate cache
outdate when send pv_found to lvmetad.Revert it by calling
label_read in lvmetad_pvscan_single
---
 lib/cache/lvmetad.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index 4b1b095..80aee66 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -2256,6 +2256,7 @@ int lvmetad_pvscan_single(struct cmd_context *cmd, struct device *dev,
 		return 1;
 	}
 
+	label_read(dev);
 	if (!(info = lvmcache_info_from_pvid(dev->pvid, dev, 0))) {
 		log_print_unless_silent("No PV info found on %s for PVID %s.", dev_name(dev), dev->pvid);
 		if (!lvmetad_pv_gone_by_dev(dev))
-- 
2.19.1

