From 39e51c048e7299c12d5f50a443682276448e5054 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 22 Apr 2015 14:16:46 +0200 Subject: [PATCH] scst_lib: Make a debug statement more informative --- scst/src/scst_lib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index d81850b43..c642ae945 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -5188,7 +5188,11 @@ static int scst_ws_push_single_write(struct scst_write_same_priv *wsp, TRACE_ENTRY(); - EXTRACHECKS_BUG_ON(len != sg_data_length(wsp->ws_sg, wsp->ws_sg_cnt)); +#ifdef CONFIG_SCST_EXTRACHECKS + if (len != sg_data_length(wsp->ws_sg, wsp->ws_sg_cnt)) + WARN_ONCE(true, "lba %lld: %d <> %lld\n", lba, len, + sg_data_length(wsp->ws_sg, wsp->ws_sg_cnt)); +#endif if (unlikely(test_bit(SCST_CMD_ABORTED, &ws_cmd->cmd_flags)) || unlikely(ws_cmd->completed)) {