lkml.org 
[lkml]   [2014]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    SubjectRe: [patch]blk-mq: blk_mq_tag_to_rq should handle flush request
    From
    On Thu, Jun 5, 2014 at 12:33 AM, Christoph Hellwig <hch@infradead.org> wrote:
    > On Wed, Jun 04, 2014 at 10:28:40AM -0600, Jens Axboe wrote:
    >> > Attachment patch should be enough.
    >>
    >> Yep, looks fine. Care to send as a proper patch, then I will include it?
    >
    > I think we an also drop the assignment to q->flush_rq->cmd_flags in
    > flush_end_io now.
    >

    Yes, that is already done, :-)

    Jens, attachment is the formal one, thanks.

    Thanks,
    --
    Ming Lei
    From 77eb2e96942deed528b2e5892a7d9aa3735c0c67 Mon Sep 17 00:00:00 2001
    From: Ming Lei <tom.leiming@gmail.com>
    Date: Thu, 5 Jun 2014 00:23:55 +0800
    Subject: [PATCH] block: mq flush: clear flush_rq's tag in flush_end_io()

    So that blk_mq_tag_to_rq() can decide if one request
    is flush_rq by comparing the tag.

    Signed-off-by: Ming Lei <tom.leiming@gmail.com>
    ---
    block/blk-flush.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/block/blk-flush.c b/block/blk-flush.c
    index ff87c66..8ffee4b 100644
    --- a/block/blk-flush.c
    +++ b/block/blk-flush.c
    @@ -225,7 +225,7 @@ static void flush_end_io(struct request *flush_rq, int error)

    if (q->mq_ops) {
    spin_lock_irqsave(&q->mq_flush_lock, flags);
    - q->flush_rq->cmd_flags = 0;
    + q->flush_rq->tag = -1;
    }

    running = &q->flush_queue[q->flush_running_idx];
    --
    1.7.9.5
    \
     
     \ /
      Last update: 2014-06-04 19:21    [W:3.243 / U:0.360 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site