Skip to contentSkip to conversation

master - scan: refresh filters before scan

PATCH David Teigland 1 participant 1 message Apr 26, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=cdb8400de2d89e2e5901524acdd2178118d740b7
Commit:        cdb8400de2d89e2e5901524acdd2178118d740b7
Parent:        1c97fda42576367e263f8c928c060271787ad1c1
Author:        David Teigland <[email protected]>
AuthorDate:    Thu Apr 26 14:48:13 2018 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Thu Apr 26 14:48:13 2018 -0500

scan: refresh filters before scan

The filters save information about devices that should be ignored, so if we need to repeat a scan (unusual, but happens in clvmd), we need to update the filters.

---
 lib/cache/lvmcache.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
lib/cache/lvmcache.c +3 -0
index 7534567..e88d350 100644
@@ -1251,6 +1251,9 @@ int lvmcache_label_scan(struct cmd_context *cmd)
 		goto out;
 	}
 
+	if (!refresh_filters(cmd))
+		log_error("Scan failed to refresh device filter.");
+
 	/*
 	 * Duplicates found during this label scan are added to _found_duplicate_devs().
 	 */