Message ID | 20230523021017.3048783-1-yukuai1@huaweicloud.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1845403vqo; Mon, 22 May 2023 19:25:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43lqW4BRBlQ9sck0WCV1R5/8cJlxUWsC7phn1XU0VZOyWiwe2AD8fF8NarO1BxSMn9AzT/ X-Received: by 2002:a05:6a00:1a15:b0:643:b4d5:e3db with SMTP id g21-20020a056a001a1500b00643b4d5e3dbmr16847068pfv.4.1684808746104; Mon, 22 May 2023 19:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684808746; cv=none; d=google.com; s=arc-20160816; b=GCFN7eLFCQHh7iWpPGzffOB5kEJEcKoHOMu6k38JEm2Uw7GfiprlDu56naXEh66ZjG fuPLXbwEnOdR5s7q+64LIkHhuCflUhNMJQEL8Ctf4dcNXhKbi9gBqotf+ZXVwqYLAAvg bs1wOonUr9rRIW9ZSUNKa5Db+/n7Ri+tQBtKR+nVjmWrg6xSwZuHGMZNLAEpatwFD84R Y7FdxisP4zfjiK9/AQvfJxI9Oh73n1HWpTyOfD7UJ2dnEi4UnmxUX685Wq8VlJo8H5WW Xs5YAM0kbPjGivDpMPZQPsETdMKy7qYwKk1b3FFbHGsa5Jh8wObfX4aQ2WDj3dvPOOwV NVNA== 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=PdgFNuSN8N2T1fo1t7x60/Hd6ZaRR9qPmwPpMrdW/Ms=; b=H42DCFMnRKx6FyIWR9VmDq2pAjVae8JX46y/1mzcK+i4VDmCGIizmMKfNOTU6LQRTT opGpwEYBQMpDQl8OlXfCHfHzQuPzHMbCpataPQEI2OktgmqwVK00CUCHDrcAcHrW9eXN Ncc8t/UeiArn5cbuIxd8j/frsTyX8h+ycTQKnWgsE9s5pnrSZC80FS7PhidgurpcIrty eV3W4vPllKerNMKyBb8K3ymv8BJNIDEWwmDS2ludYQFNB1XDawq1sVnS9Rx6dXoUUxSX zNZ4qZ4MVtdEMaDuEI64Ni5GIBorbIcbphp9/r9vnJZu9wrKcL7onuIH0uFlu7xK5I8W uFSQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x11-20020aa7940b000000b0063b21db5973si1219114pfo.358.2023.05.22.19.25.33; Mon, 22 May 2023 19:25:46 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233212AbjEWCNz (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Mon, 22 May 2023 22:13:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230017AbjEWCNw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 22 May 2023 22:13:52 -0400 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DD171BC; Mon, 22 May 2023 19:13:37 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4QQHt51L8Yz4f3m6q; Tue, 23 May 2023 10:13:33 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP4 (Coremail) with SMTP id gCh0CgBH_rFMIWxkwVsOKA--.63694S4; Tue, 23 May 2023 10:13:34 +0800 (CST) From: Yu Kuai <yukuai1@huaweicloud.com> To: logang@deltatee.com, song@kernel.org Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, yukuai3@huawei.com, yukuai1@huaweicloud.com, yi.zhang@huawei.com, yangerkun@huawei.com Subject: [PATCH v8 0/5] md: protect md_thread with rcu Date: Tue, 23 May 2023 10:10:12 +0800 Message-Id: <20230523021017.3048783-1-yukuai1@huaweicloud.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgBH_rFMIWxkwVsOKA--.63694S4 X-Coremail-Antispam: 1UD129KBjvJXoW7WrWfCry5Cr45Cr4DZFW8WFg_yoW8Zr1DpF W3KF9xXr4UCrsxZFsxZ347Ca45G3Z5Kay7KryIyw1rZa45uryUJr4xJFykuF9rWFyfJa9F qF15Jw1DCa40yaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUyK14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4U JVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gc CE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1l42xK82IYc2Ij64vI r41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8Gjc xK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0 cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8V AvwI8IcIk0rVWrJr0_WFyUJwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF 7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfUoOJ5UUUUU X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766649874840773965?= X-GMAIL-MSGID: =?utf-8?q?1766650015649645410?= |
Series |
md: protect md_thread with rcu
|
|
Message
Yu Kuai
May 23, 2023, 2:10 a.m. UTC
From: Yu Kuai <yukuai3@huawei.com>
Changes in v8:
- fix that another unrelated patch is merged into this patchset
- update commit message for patch 5
- rebase on the top of another patch from me: [PATCH v3] md: fix duplicate filename for rdev
Changes in v7:
- add missing changes for md-cluster
- rebase for the latest md-next branch
Changes in v6:
- remove first patch from v5, and use rcu_asign_pointer() directly from
caller.
- always use rcu_read_lock/unlock to protect mddev_set_timeout().
Changes in v5:
- use rcu_dereference_protected() instead of rcu_access_pointer() where
rcu_read_lock/unlock is not required.
- add patch 4,5 to handle that bitmap timeout is set multiple times.
Changes in v4:
- remove patch 2 from v3
- fix sparse errors and warnings from v3, in order to do that, all access
to md_thread need to be modified, patch 2-4 is splited to avoid a huge
patch.
Changes in v3:
- remove patch 3 from v2
- use rcu instead of a new lock
Changes in v2:
- fix a compile error for md-cluster in patch 2
- replace spin_lock/unlock with spin_lock/unlock_irq in patch 5
- don't wake up inside the new lock in md wakeup_thread in patch 5
Yu Kuai (5):
md: factor out a helper to wake up md_thread directly
dm-raid: remove useless checking in raid_message()
md/bitmap: always wake up md_thread in timeout_store
md/bitmap: factor out a helper to set timeout
md: protect md_thread with rcu
drivers/md/dm-raid.c | 4 +-
drivers/md/md-bitmap.c | 43 +++++++++++--------
drivers/md/md-cluster.c | 17 +++++---
drivers/md/md-multipath.c | 4 +-
drivers/md/md.c | 88 +++++++++++++++++++++------------------
drivers/md/md.h | 8 ++--
drivers/md/raid1.c | 7 ++--
drivers/md/raid1.h | 2 +-
drivers/md/raid10.c | 20 +++++----
drivers/md/raid10.h | 2 +-
drivers/md/raid5-cache.c | 22 ++++++----
drivers/md/raid5.c | 15 +++----
drivers/md/raid5.h | 2 +-
13 files changed, 132 insertions(+), 102 deletions(-)
Comments
On Mon, May 22, 2023 at 7:13 PM Yu Kuai <yukuai1@huaweicloud.com> wrote: > > From: Yu Kuai <yukuai3@huawei.com> > > Changes in v8: > - fix that another unrelated patch is merged into this patchset > - update commit message for patch 5 > - rebase on the top of another patch from me: [PATCH v3] md: fix duplicate filename for rdev Applied to md-next. Thanks, Song