[Devel] [RH7 PATCH 6/6] patch ploop_state_debugging.patch

Dmitry Monakhov dmonakhov at openvz.org
Thu Jun 23 10:25:58 PDT 2016


Signed-off-by: Dmitry Monakhov <dmonakhov at openvz.org>
---
 drivers/block/ploop/dev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 090cd2d..9bf8592 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -1232,6 +1232,12 @@ static void ploop_complete_request(struct ploop_request * preq)
 	}
 	preq->bl.tail = NULL;
 
+	if (!preq->error) {
+		unsigned long state = READ_ONCE(preq->state);
+		WARN_ON(state & (PLOOP_REQ_POST_SUBMIT_FL|
+				 PLOOP_REQ_DEL_CONV_FL |
+				 PLOOP_REQ_DEL_FLUSH_FL ));
+	}
 	if (test_bit(PLOOP_REQ_RELOC_A, &preq->state) ||
 	    test_bit(PLOOP_REQ_RELOC_S, &preq->state)) {
 		if (preq->error)
-- 
1.8.3.1



More information about the Devel mailing list