[RHEL7,COMMIT] ploop: Add more debug info into PLOOP_REQ_TRACE_ERROR

Submitted by Konstantin Khorenko on June 18, 2020, 4:49 p.m.

Details

Message ID 202006181649.05IGncAw002493@finist-ce7.sw.ru
State New
Series "ploop: Add more debug info into PLOOP_REQ_TRACE_ERROR"
Headers show

Commit Message

Konstantin Khorenko June 18, 2020, 4:49 p.m.
The commit is pushed to "branch-rh7-3.10.0-1127.10.1.vz7.162.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.10.1.vz7.162.4
------>
commit 5f848dc98ef191f6963b1a722787534408916fb5
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Thu Jun 18 19:49:38 2020 +0300

    ploop: Add more debug info into PLOOP_REQ_TRACE_ERROR
    
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 include/linux/ploop/ploop.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/include/linux/ploop/ploop.h b/include/linux/ploop/ploop.h
index 68e6a6a21b54f..0ea069abd40a4 100644
--- a/include/linux/ploop/ploop.h
+++ b/include/linux/ploop/ploop.h
@@ -720,8 +720,11 @@  static inline void ploop_req_set_error(struct ploop_request * preq, int err)
 #define PLOOP_REQ_TRACE_ERROR(preq, err)					\
 	do {									\
 		if ((err)) {							\
-			printk("%s() %d ploop%d set error %d\n",		\
-			__FUNCTION__, __LINE__, (preq)->plo->index, (int)(err));\
+			printk("%s() %d ploop%d set error %d: clu=%u, sec=%lu, "\
+				"size=%u, rw=0x%x, iblock=%u\n",		\
+			__FUNCTION__, __LINE__, (preq)->plo->index, (int)(err),	\
+			(preq)->req_cluster, (preq)->req_sector,		\
+			(preq)->req_size, (preq)->req_rw, (preq)->iblock);	\
 			PLOOP_TRACE_ERROR_DUMP_STACK();				\
 		}								\
 	} while (0);