Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp301872iob; Fri, 13 May 2022 01:58:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMZPkh4tFS7ekt1G4pp9u/P8er+wGFaEEN8J3P9VCsHB8Zq2y5LZ1cFpS9PFE/01yr8ajN X-Received: by 2002:a05:6a00:1a47:b0:510:a41b:362d with SMTP id h7-20020a056a001a4700b00510a41b362dmr3817149pfv.30.1652432300269; Fri, 13 May 2022 01:58:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652432300; cv=none; d=google.com; s=arc-20160816; b=poyww6N7hBjXXf4CnF5IIqYvhmJS2sbbfLHXgvEoZn9bBu4YPAA2JTIOPVDVp3g6uJ WpIHC6uzurOXGdtOYAuZvoU+BVTdffHaus0qEVr9MF5+pkpQ+dBd3UiSUdMChsAnKaWm FgK0lRhCCRbn0lpbUzUYMrXjj3+DxS5LPdOOiekv9uCLSRU5uungdPoBF4YquhnmY6bR SWlefjEbvFsIET/Abwwz4ekFYkHUvPxOVhGpw4ce7exUdL5m2EgE8B7wG2ajPtxPLvn1 9hCS+y1g4L/C8Dg/QQwtBC0AiePxEJGmuemch0vsfuqpu9vHblBugDt4hNLijLfvY0wp kBVw== 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=9TibtqwIkXAYhgUKhBkRtkUVIgIy0iLq5gtCMcEicjA=; b=mqMwizBtP66d7EJlRHDYBMDnJiNI+Jg9dvqocf6zX5yYeQJOrXQCZadGpUhPwCxPX5 slgpI9Bxz4yr1MAMqqp9D73nDo5IXJGdEeJ0YfLq0vWkv8hskxzyfPpWbldyS9pu0TLJ vvAdGLimDxPRI9ek9kvZZCs7RBL/JnfZgWsKz1wNLgribGclGhCSgIgeiRjWwOcGphIp I3RTZZEnx7AnSvPfLl9uI4hZ7cQWh7HMm+B5uDNK3zHIanu8kp5t79PZpMnNeYOSMUrI ugQR18WtyylCoaQ47yhtrXUhxVXXge5EbeaWeOdVQdNvNYCd6yrEitnnWugJgON0QE6C F6cw== 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 s35-20020a056a001c6300b004fa3a8dffa6si2578910pfw.93.2022.05.13.01.58.08; Fri, 13 May 2022 01:58:20 -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 S1376667AbiEMDU4 (ORCPT + 99 others); Thu, 12 May 2022 23:20:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376711AbiEMDUw (ORCPT ); Thu, 12 May 2022 23:20:52 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB813630B; Thu, 12 May 2022 20:20:49 -0700 (PDT) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Kzv3T5p4TzGpZj; Fri, 13 May 2022 11:17:57 +0800 (CST) Received: from kwepemm600009.china.huawei.com (7.193.23.164) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 13 May 2022 11:20:47 +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; Fri, 13 May 2022 11:20:47 +0800 Subject: Re: [PROBLEM] nbd requests become stuck when devices watched by inotify emit udev uevent changes To: Matthew Ruffell , Josef Bacik CC: Jens Axboe , linux-block , nbd , Linux Kernel References: <20220422054224.19527-1-matthew.ruffell@canonical.com> From: "yukuai (C)" Message-ID: <0eb5ff67-b1f0-a8c4-281c-55a5ded58662@huawei.com> Date: Fri, 13 May 2022 11:20:46 +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: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600009.china.huawei.com (7.193.23.164) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-7.1 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/13 10:56, Matthew Ruffell 写道: > 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. Hi, Matthew Thanks for your test. > > [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 that I missed this thread. IMO, if inflight requests is cleared by ioctl NBD_CLEAR_SOCK after my patch [2](or other callers for nbd_clear_que()), such io will return as error. Thus I don't think such io errors need to be fixed. Josef, do you have other suggestions? Thanks, Kuai