lkml.org 
[lkml]   [2011]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] block: warn the wrong tag only if it is greater than real_max_depth.
    Date
    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


    \
     
     \ /
      Last update: 2011-12-20 17:03    [W:8.575 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site