scst_lib: Make a WRITE SAME debug statement more informative

If a data length mismatch has been detected, report the LBA and
the lengths that do not match.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6346 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2015-06-16 23:49:18 +00:00
parent 69569b0cdf
commit 20986f4c1b

View File

@@ -5491,7 +5491,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)) {