[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YT/yw3QomdPgHx6m@T590>
Date: Tue, 14 Sep 2021 08:54:27 +0800
From: Ming Lei <ming.lei@...hat.com>
To: Yu Kuai <yukuai3@...wei.com>
Cc: axboe@...nel.dk, josef@...icpanda.com, hch@...radead.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
nbd@...er.debian.org, yi.zhang@...wei.com
Subject: Re: [PATCH v5 1/6] nbd: don't handle response without a
corresponding request message
On Thu, Sep 09, 2021 at 10:12:51PM +0800, Yu Kuai wrote:
> While handling a response message from server, nbd_read_stat() will
> try to get request by tag, and then complete the request. However,
> this is problematic if nbd haven't sent a corresponding request
> message:
>
> t1 t2
> submit_bio
> nbd_queue_rq
> blk_mq_start_request
> recv_work
> nbd_read_stat
> blk_mq_tag_to_rq
> blk_mq_complete_request
> nbd_send_cmd
>
> Thus add a new cmd flag 'NBD_CMD_INFLIGHT', it will be set in
> nbd_send_cmd() and checked in nbd_read_stat().
>
> Noted that this patch can't fix that blk_mq_tag_to_rq() might
> return a freed request, and this will be fixed in following
> patches.
>
> Signed-off-by: Yu Kuai <yukuai3@...wei.com>
Looks fine:
Reviewed-by: Ming Lei <ming.lei@...hat.com>
--
Ming
Powered by blists - more mailing lists