[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] [PATCH] Drop metadata cache after device was autorepared and removed from VG.



All long running processes must reload metadata when some
device becomes orphan after repair.

Signed-off-by: Milan Broz <mbroz redhat com>
---
 lib/metadata/metadata.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index c4a0332..f2ff8ac 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -2794,6 +2794,9 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
 				vg_release(correct_vg);
 				return_NULL;
 			}
+
+			/* Refresh metadata after orphan write */
+			drop_cached_metadata(correct_vg);
       next_pv:
 			;
 		}
-- 
1.6.5.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]