From: Tao Ma <tm@tao.ma>
To: linux-kernel@vger.kernel.org
Cc: linux-scsi@vger.kernel.org, dan.j.williams@intel.com,
Jens Axboe <axboe@kernel.dk>
Subject: [PATCH] block: warn the wrong tag only if it is greater than real_max_depth.
Date: Tue, 20 Dec 2011 23:58:47 +0800 [thread overview]
Message-ID: <1324396727-2840-1-git-send-email-tm@tao.ma> (raw)
In-Reply-To: <4EF0940D.7070304@kernel.dk>
From: Tao Ma <boyu.mt@taobao.com>
In queue depth decreases, we could meet with a tag greater than max_depth,
but it should never be greater than real_max_depth. So only WARN if
it is greater than real_max_depth and let it complets if it is greater
than max_depth.
Reported-by: Dan Williams <dan.j.williams@intel.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
---
block/blk-tag.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/blk-tag.c b/block/blk-tag.c
index e74d6d1..1c50d34 100644
--- a/block/blk-tag.c
+++ b/block/blk-tag.c
@@ -286,12 +286,12 @@ void blk_queue_end_tag(struct request_queue *q, struct request *rq)
BUG_ON(tag == -1);
- if (unlikely(tag >= bqt->max_depth)) {
+ if (unlikely(tag >= bqt->real_max_depth)) {
/*
- * This can happen after tag depth has been reduced.
- * But tag shouldn't be larger than real_max_depth.
+ * tag shouldn't be larger than real_max_depth.
*/
- WARN_ON(tag >= bqt->real_max_depth);
+ WARN(1, "tag %d, bqt->real_max_depth %d\n",
+ tag, bqt->real_max_depth);
return;
}
--
1.7.4.1
next prev parent reply other threads:[~2011-12-20 16:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-14 7:23 [PATCH RESEND] block: warn if tag " Tao Ma
2011-09-14 7:23 ` [PATCH RESEND] block: Don't check QUEUE_FLAG_SAME_COMP in __blk_complete_request Tao Ma
2011-09-15 1:05 ` Shaohua Li
2011-09-15 2:16 ` Tao Ma
2011-09-15 11:17 ` Christoph Hellwig
2011-09-15 11:28 ` Jens Axboe
2011-09-15 14:48 ` Tao Ma
2011-10-24 15:03 ` [PATCH RESEND] block: warn if tag is greater than real_max_depth Tao Ma
2011-10-25 8:19 ` Jens Axboe
2011-12-20 0:07 ` Dan Williams
2011-12-20 1:11 ` Tao Ma
2011-12-20 1:45 ` Dan Williams
2011-12-20 13:56 ` Jens Axboe
2011-12-20 15:21 ` Tao Ma
2011-12-20 15:58 ` Tao Ma [this message]
2011-12-20 17:31 ` [PATCH] block: warn the wrong tag only if it " Williams, Dan J
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1324396727-2840-1-git-send-email-tm@tao.ma \
--to=tm@tao.ma \
--cc=axboe@kernel.dk \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®