From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FA56C433FE for ; Mon, 16 May 2022 12:53:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243538AbiEPMxq (ORCPT ); Mon, 16 May 2022 08:53:46 -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 Precedence: bulk List-ID: X-Mailing-List: linux-block@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 > . >