Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3279761iob; Mon, 16 May 2022 18:00:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9l1NzV9XsYf0SAPvT8+FKnNGk1fuYC/0gcHu8LU9sJP9aG2Ma+QLEyHjf0ZbVdGyVm+J0 X-Received: by 2002:aa7:c38a:0:b0:42a:ab63:c5a3 with SMTP id k10-20020aa7c38a000000b0042aab63c5a3mr10812895edq.303.1652749234648; Mon, 16 May 2022 18:00:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652749234; cv=none; d=google.com; s=arc-20160816; b=xOlUE7aKvzncqGWWey0HeKNX2tq02/DonlR3SrQKHnHMs0rcdHO3bMHAk8XOGEYzkp T9nNZBcdSyX9wkjjijktykhKjrW7UY0X+y2N3a1ZJ91qKqJDBvMjYiDSyffp/wfv9rRe 20eMKrSt1Is0ypzJQ0EBGxhcnMF8Lk+syET0Yse8S9xKcxEyiooR6l909wrjLD8VMxYv 5BwALCeAzfI3BV/t/ncDIkcxhVb/eDvv+7uBPoJZqvdhLmLxfRbpCVNykV9o6LigYiN5 ZlZJdyzAxzGoLjkC5Jx51XlsuUy0LjwLguOi0hjqztdxsI65WsQSgciV+cYwDMY5frXF eFQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=gUFukvYwCRJi3DI4xfYqE4jBKGqcEb+Quijfj4aOLq8=; b=uPYplX/gUzTMpOni7aX4xQMB7Vgg8zOMZPJMnlqcDlD8pvOZSjhbDXfvBf1kFSWhkc +imfZgeR09PJkYzY8Jm/aiGr+zkQ9gdCOmhIwhSDAnBIMMd3l+2ciKg86ShtBJJ/9mBe CwLnq4BsD+xi5CRpqkvjlIiAtDd13qtGP1OrQjANqqB94g9QZld+9Qdbm8cEcv13S2av uPPJl2nQuJAoZnvcZRD9szMgww68MhrKeDqgZV7KPbJEk1W0K+woum4XuxtumORqA3vW 3juSET4kJ50fb52UwD8D0Rbhu0gpdCtEJYLLD5p7IU5rp98pwvqGp2tLD5RuzE7gvWjw zT0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r11-20020a1709067fcb00b006f3b3dd9712si989757ejs.196.2022.05.16.18.00.09; Mon, 16 May 2022 18:00:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243558AbiEPMyG (ORCPT + 99 others); Mon, 16 May 2022 08:54:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243416AbiEPMxZ (ORCPT ); Mon, 16 May 2022 08:53:25 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9127538BD0; Mon, 16 May 2022 05:53:24 -0700 (PDT) Received: from kwepemi100016.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4L1zZP5tqvzCspx; Mon, 16 May 2022 20:48:29 +0800 (CST) Received: from kwepemm600009.china.huawei.com (7.193.23.164) by kwepemi100016.china.huawei.com (7.221.188.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 16 May 2022 20:53:22 +0800 Received: from [10.174.176.73] (10.174.176.73) by kwepemm600009.china.huawei.com (7.193.23.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 16 May 2022 20:53:22 +0800 Subject: Re: [PROBLEM] nbd requests become stuck when devices watched by inotify emit udev uevent changes To: Josef Bacik CC: Matthew Ruffell , Jens Axboe , linux-block , nbd , Linux Kernel References: <20220422054224.19527-1-matthew.ruffell@canonical.com> <6efae367-12fa-1a58-7438-1b39dc0d6ef8@huawei.com> From: "yukuai (C)" Message-ID: Date: Mon, 16 May 2022 20:53:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.176.73] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600009.china.huawei.com (7.193.23.164) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2022/05/16 20:17, Josef Bacik 写道: >> 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. >> > > Re-submit this one, but fix it so we just test the bit to see if we need to skip > it, and change it so we only CLEAR when we're sure we're going to complete the > request. Thanks, Ok, thanks for your advice. I'll send a new version. BTW, do you have any suggestions on other patches of the patchset? https://lore.kernel.org/all/20220426130746.885140-1-yukuai3@huawei.com/ Thanks, Kuai > > Josef > . >