mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "yukuai (C)" <yukuai3@huawei.com>
To: Josef Bacik <josef@toxicpanda.com>,
	Matthew Ruffell <matthew.ruffell@canonical.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block <linux-block@vger.kernel.org>,
	nbd <nbd@other.debian.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PROBLEM] nbd requests become stuck when devices watched by inotify emit udev uevent changes
Date: Sat, 14 May 2022 11:39:25 +0800	[thread overview]
Message-ID: <6efae367-12fa-1a58-7438-1b39dc0d6ef8@huawei.com> (raw)
In-Reply-To: <Yn5Zf6lONff1AoOA@localhost.localdomain>

在 2022/05/13 21:13, Josef Bacik 写道:
> On Fri, May 13, 2022 at 02:56:18PM +1200, Matthew Ruffell wrote:
>> Hi Josef,
>>
>> Just a friendly ping, I am more than happy to test a patch, if you send it
>> inline in the email, since the pastebin you used expired after 1 day, and I
>> couldn't access it.
>>
>> I came across and tested Yu Kuai's patches [1][2] which are for the same issue,
>> and they indeed fix the hang. Thank you Yu.
>>
>> [1] nbd: don't clear 'NBD_CMD_INFLIGHT' flag if request is not completed
>> https://lists.debian.org/nbd/2022/04/msg00212.html
>>
>> [2] nbd: fix io hung while disconnecting device
>> https://lists.debian.org/nbd/2022/04/msg00207.html
>>
>> I am also happy to test any patches to fix the I/O errors.
>>
> 
> Sorry, you caught me on vacation before and I forgot to reply.  Here's part one
> of the patch I wanted you to try which fixes the io hung part.  Thanks,
> 
> Josef
> 
>   
>>From 0a6123520380cb84de8ccefcccc5f112bce5efb6 Mon Sep 17 00:00:00 2001
> Message-Id: <0a6123520380cb84de8ccefcccc5f112bce5efb6.1652447517.git.josef@toxicpanda.com>
> From: Josef Bacik <josef@toxicpanda.com>
> Date: Sat, 23 Apr 2022 23:51:23 -0400
> Subject: [PATCH] timeout thing
> 
> ---
>   drivers/block/nbd.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
> index 526389351784..ab365c0e9c04 100644
> --- a/drivers/block/nbd.c
> +++ b/drivers/block/nbd.c
> @@ -1314,7 +1314,10 @@ static void nbd_config_put(struct nbd_device *nbd)
>   		kfree(nbd->config);
>   		nbd->config = NULL;
>   
> -		nbd->tag_set.timeout = 0;
> +		/* Reset our timeout to something sane. */
> +		nbd->tag_set.timeout = 30 * HZ;
> +		blk_queue_rq_timeout(nbd->disk->queue, 30 * HZ);
> +
>   		nbd->disk->queue->limits.discard_granularity = 0;
>   		nbd->disk->queue->limits.discard_alignment = 0;
>   		blk_queue_max_discard_sectors(nbd->disk->queue, 0);
> 
Hi, Josef

This seems to try to fix the same problem that I described here:

nbd: fix io hung while disconnecting device
https://lists.debian.org/nbd/2022/04/msg00207.html

There are still some io that are stuck, which means the devcie is
probably still opened. Thus nbd_config_put() can't reach here.
I'm afraid this patch can't fix the io hung.

Matthew, can you try a test with this patch together with my patch below
to comfirm my thought?

nbd: don't clear 'NBD_CMD_INFLIGHT' flag if request is not completed
https://lists.debian.org/nbd/2022/04/msg00212.html.

Thanks,
Kuai

  reply	other threads:[~2022-05-14  3:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22  5:42 Matthew Ruffell
2022-04-22 15:23 ` Josef Bacik
2022-04-25 21:47   ` Matthew Ruffell
2022-05-13  2:56     ` Matthew Ruffell
2022-05-13  3:20       ` yukuai (C)
2022-05-13 13:13       ` Josef Bacik
2022-05-14  3:39         ` yukuai (C) [this message]
2022-05-16  5:35           ` Matthew Ruffell
2022-05-16 12:17           ` Josef Bacik
2022-05-16 12:53             ` yukuai (C)

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=6efae367-12fa-1a58-7438-1b39dc0d6ef8@huawei.com \
    --to=yukuai3@huawei.com \
    --cc=axboe@kernel.dk \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.ruffell@canonical.com \
    --cc=nbd@other.debian.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®