From: Bart Van Assche <bvanassche@acm.org>
To: Joseph Qi <joseph.qi@linux.alibaba.com>,
Josef Bacik <josef@toxicpanda.com>,
Ming Lei <tom.leiming@gmail.com>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, nbd@other.debian.org
Subject: Re: [PATCH v2 1/2] nbd: mark the socket dead when a partial send times out
Date: Mon, 28 Sep 2026 07:22:01 -0700 [thread overview]
Message-ID: <3055910d-cbe3-4753-b372-413852cc4a46@acm.org> (raw)
In-Reply-To: <20260928091021.2456652-1-joseph.qi@linux.alibaba.com>
On 9/28/26 2:10 AM, Joseph Qi wrote:
> diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
> index ffce519bf008..c2c3dbdd631f 100644
> --- a/drivers/block/nbd.c
> +++ b/drivers/block/nbd.c
> @@ -838,6 +838,14 @@ static void nbd_pending_cmd_work(struct work_struct *work)
> /* don't bother timeout handler for partial sending */
> if (READ_ONCE(jiffies) + msecs_to_jiffies(wait_ms) >= deadline) {
> cmd->status = BLK_STS_IOERR;
> + /*
> + * The header is on the wire but the rest of the payload
> + * never will be, so the stream is out of sync with the
> + * server. Marking the socket dead also drops the stale
> + * nsock->pending, which would otherwise make
> + * nbd_handle_cmd() requeue every later request forever.
> + */
> + nbd_mark_nsock_dead(nbd, nsock, 1);
> blk_mq_complete_request(req);
> break;
> }
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
next prev parent reply other threads:[~2026-09-28 14:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 9:10 [PATCH v2 1/2] nbd: mark the socket dead when a partial send times out Joseph Qi
2026-09-28 9:10 ` [PATCH v2 2/2] nbd: fix NULL pointer dereference in nbd_pending_cmd_work() Joseph Qi
2026-09-28 14:19 ` Bart Van Assche
2026-09-29 1:02 ` Joseph Qi
2026-10-08 7:22 ` Joseph Qi
2026-09-28 14:22 ` Bart Van Assche [this message]
2026-09-29 9:03 ` [PATCH v2 1/2] nbd: mark the socket dead when a partial send times out Ming Lei
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=3055910d-cbe3-4753-b372-413852cc4a46@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=josef@toxicpanda.com \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-block@vger.kernel.org \
--cc=nbd@other.debian.org \
--cc=tom.leiming@gmail.com \
/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