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

[lvm-devel] master - activate: report release with critical section



Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0ca16c694668ded9b33c22dc54316dd4bd77151b
Commit:        0ca16c694668ded9b33c22dc54316dd4bd77151b
Parent:        e5382c063d2549d3a28b3182218b7978e0c22442
Author:        Zdenek Kabelac <zkabelac redhat com>
AuthorDate:    Thu Mar 20 10:31:21 2014 +0100
Committer:     Zdenek Kabelac <zkabelac redhat com>
CommitterDate: Fri Mar 21 22:29:22 2014 +0100

activate: report release with critical section

This function is typically called for cmd context refresh or destroy.
On the non-clustered case we already unlocked all messages,
however when i.e. 'clvmd' gets break signal it may have
still couple messages queued.

For now just report an error.
---
 lib/activate/activate.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index 565634f..9d404e5 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -2348,11 +2348,16 @@ int pv_uses_vg(struct physical_volume *pv,
 
 void activation_release(void)
 {
-	dev_manager_release();
+	if (critical_section())
+		/* May leak stacked operation */
+		log_error("Releasing activation in critical section.");
+
+	fs_unlock(); /* Implicit dev_manager_release(); */
 }
 
 void activation_exit(void)
 {
+	activation_release();
 	dev_manager_exit();
 }
 #endif


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