Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1991275ioo; Sat, 28 May 2022 01:28:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy07+PhzGAtUCno8yP4zASc/U6qh+EfAgTyZQ/yhrSt5Xoj2/HiZ7RblzVrXXMK9NSUQ7Pu X-Received: by 2002:a05:6a00:851:b0:518:50a9:32f5 with SMTP id q17-20020a056a00085100b0051850a932f5mr42239674pfk.47.1653726514945; Sat, 28 May 2022 01:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653726514; cv=none; d=google.com; s=arc-20160816; b=qKT7yiv4Jfk4YzLrlEKPytvwjv7w3WpijOE7THgOTSmjWT4cD4oEqa6UTl9Gfe8aIX P515abIZMbjDoihcJh8TLzd6xBnTcRaNFLkeNmObQEaowAQ5vMRe3rNmgYJnktp2QuSb S/aXIscyXg8eNmp9aa0dw1IMFxRp+3f/UdG6hvq6pilo16z+Emw+yizOtcpVpOmvt8Gg XwJI7lPKR21pDX0lWKfc1G9V5jHsVVvZc4ey/YUvqDW4/2q1LzGPKaK3LTYfz0RfjmKY FapteIMbWG60/UloXc37SkTxR0GzePdyLINhLA2pz9XS+8JurKo4jkSJvEIO3ueMqFV7 ZOHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=k5OrhBekXjlVc618riXZlb6TCGus/fEf0tEGZYd9too=; b=WtoIu7R1JnuyFR55mQXBoBd+JmXo8CnoqP2ieRm+xaCLoGKBDW/7Q/kP5bXo4ii30n CsoyhISTJzsL88FT9hbE5B2u4cQZV02jRmWCra8Qg9q88Tfv/MhtpXzWW0T4llKjKoUY 7f5WFCQdn4+FfWEgM5jrfxlDn4x0K6m5G7+T0KO97LBijwN+g8RfatLnglXjfsBJjFfF UXzjzhvL3FcE1T/fQmkhNIwG8iLSzqATMHDZGqaUyj/yGVGYa4MrbNMLY5zcBO6RtjgF Z8vNWLqS9weai4T/soe8xANSCcaYxHnl64v3j2i131cmgnW42trIZre3lXflYDRKHXg4 Aw1g== 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 i1-20020a17090332c100b0015eb782c600si10531314plr.179.2022.05.28.01.28.14; Sat, 28 May 2022 01:28: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 S1355341AbiE1B7L (ORCPT + 99 others); Fri, 27 May 2022 21:59:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352313AbiE1B7J (ORCPT ); Fri, 27 May 2022 21:59:09 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF35C5B3CA; Fri, 27 May 2022 18:59:07 -0700 (PDT) Received: from kwepemi500024.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4L94Yl6WH3z1JCBP; Sat, 28 May 2022 09:57:31 +0800 (CST) Received: from kwepemm600009.china.huawei.com (7.193.23.164) by kwepemi500024.china.huawei.com (7.221.188.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 28 May 2022 09:59:05 +0800 Received: from huawei.com (10.175.127.227) 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; Sat, 28 May 2022 09:59:04 +0800 From: Yu Kuai To: , , , CC: , , , Subject: [PATCH -next v4 0/6] nbd: bugfix and cleanup patches Date: Sat, 28 May 2022 10:12:29 +0800 Message-ID: <20220528021235.2120995-1-yukuai3@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600009.china.huawei.com (7.193.23.164) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,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 Changes in v4 - in patch 3, return from nbd_handle_reply() with flag cleared if request is ready to complete. - add reviewed-by tag for patch 1-2, 4-6. Changes in v3: - rewrap to 80 columns where possible in patch 6 Changes in v2: - in patch 3, instead of clear and then reset the flag if rq is not completed, test first and clear if rq is going to complete. path 1-2 fix races between nbd setup and module removal. patch 3 fix io can't be completed in some error path. patch 4 fix io hung when disconnecting failed. patch 5 fix sysfs warning about duplicate creation. patch 6 use pr_err to output error message. Previous versions: v1: https://lore.kernel.org/all/20220426130746.885140-1-yukuai3@huawei.com/ v2: https://lore.kernel.org/all/20220518122618.1702997-1-yukuai3@huawei.com/ v3: https://lore.kernel.org/all/20220521073749.3146892-1-yukuai3@huawei.com/ Yu Kuai (5): nbd: call genl_unregister_family() first in nbd_cleanup() nbd: fix race between nbd_alloc_config() and module removal nbd: don't clear 'NBD_CMD_INFLIGHT' flag if request is not completed nbd: fix io hung while disconnecting device nbd: use pr_err to output error message Zhang Wensheng (1): nbd: fix possible overflow on 'first_minor' in nbd_dev_add() drivers/block/nbd.c | 109 +++++++++++++++++++++++++------------------- 1 file changed, 63 insertions(+), 46 deletions(-) -- 2.31.1