Skip to contentSkip to conversation

master - lvmetad: Drop active connection upon lvmetad_set_active(0).

PATCH Petr Rockai 1 participant 1 message Jun 9, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1824a781db2dcdb328ba61893a1ace192cb78775
Commit:        1824a781db2dcdb328ba61893a1ace192cb78775
Parent:        488f3085279e24af21e870d5a74d0953094552f7
Author:        Petr Rockai <[email protected]>
AuthorDate:    Mon Jun 9 01:55:33 2014 +0200
Committer:     Petr Rockai <[email protected]>
CommitterDate: Mon Jun 9 01:55:33 2014 +0200

lvmetad: Drop active connection upon lvmetad_set_active(0).

---
 lib/cache/lvmetad.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
lib/cache/lvmetad.c +2 -0
index c03590e..7896ddd 100644
@@ -101,6 +101,8 @@ int lvmetad_active(void)
 void lvmetad_set_active(int active)
 {
 	_lvmetad_use = active;
+	if (!active && lvmetad_active())
+		lvmetad_disconnect();
 }
 
 /*