Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1658453ioo; Sun, 22 May 2022 23:19:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8Is/AR0u9PdEOC0OGlwIYNLHpk+hCy/PclwL/Oc1uQnCqXlnV6cQvwVFSIVYP6ZB4RkPT X-Received: by 2002:a17:902:b692:b0:14c:935b:2b03 with SMTP id c18-20020a170902b69200b0014c935b2b03mr21500340pls.81.1653286790860; Sun, 22 May 2022 23:19:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653286790; cv=none; d=google.com; s=arc-20160816; b=KlO/Fs5pX/AELHIirj3cSBpUrWIs7OV2Y+ooyhAWNzIfwUXmNUe2fM8z0F9D8cDMzg 1ELNFjgV9pa+ggc7PZVPLRIjCdjgqhsOJ9W4OavWJObVNBqtFUZNIhrbbhurmJfTnXal bMos8IpX1qwsYJ9UufSCo6w5+xNE8IZRGDwEjA8H+kObeY3mqy05FSc063M4QRNqSXvz 9PUqaq5ofQ480yB7CvEAoDJpr5M1JtbSJYPYeD/cwVa3HnzfWdja5t6goQAEnO+1Yu0+ YvjHPfce28TBYOGgWnNJv+H09iMjLZoLkiZBp115Z01IHz6lIvMJABt9wREQyNIj0LO3 XAqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :message-id:date:cc:to:from:dkim-signature; bh=MZeXC7bp8nJCmM9SY95bVbKQFzLlTbsMUaxfluhzO2Y=; b=oNFjvk5+FCmoQecayR5i4dFrPZFuJD0hFmL+Xk59+nBcy+21Luq6dfRC90W1LYccWO P4Ipiu8gO8/Qh+o65nr6QDyLyIjX5Nx9pa++aYJN/twtx4aRB0b2G8sH+sedpBgKXxjm hztcxZGGS9Ac4RTEjfwsnsgA90HYZlKATYAt1W/eSX88HUMsLsekOD5SuaWMz+xgA2nA IOPowNjQxuw+FO/gXV7d317mIkT74jMsPhWBzaVWS0PBxkzu/6jUOvzV+5upN96aXjBd PoWM37jmfAN+Y5tCn3aERDq31U0qEv80QmBxc3JCQAj28Vz5Q2ZIFad2GiDqJkuyVrCV a2Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=RPIvY7qK; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id nu13-20020a17090b1b0d00b001d973c6d990si1865041pjb.169.2022.05.22.23.19.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:19:50 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=RPIvY7qK; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3BB4842A0D; Sun, 22 May 2022 23:04:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244368AbiESTNf (ORCPT + 99 others); Thu, 19 May 2022 15:13:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243697AbiESTNU (ORCPT ); Thu, 19 May 2022 15:13:20 -0400 Received: from ale.deltatee.com (ale.deltatee.com [204.191.154.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E17D1AF1CD; Thu, 19 May 2022 12:13:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:MIME-Version:Message-Id:Date:Cc:To:From :references:content-disposition:in-reply-to; bh=MZeXC7bp8nJCmM9SY95bVbKQFzLlTbsMUaxfluhzO2Y=; b=RPIvY7qK8UKUvD7bTulAKZiK0d ce2ZThn9g9TLUzlbITS7c+JtcTuZtGtbrLJEbtHJF3UubBKNIzs4kYCx/S/tIWsu2euBSkUIfAIdK cYHblTEf+wARPXXWLnBqttcp/KwEUbpwcWrBi3kmPSd0zD8aT4iI8gxh48q0uGt1Bs68pZK/Qz5IT wFA57fEuHP08DSsmENaeXqjyHZxfHQvQxQM4uGa4G4iIpjKDyDLwIli1a8mqZiyRVEPGj6CxkpTvj bPWZ7lcfg0YUtdWel1udUIKnUXU/QC3rtAvf4dj3qTkWw/znUFv1dEAQh/vZn+2/ZeOWe6caFAPFJ BpQcg80A==; Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nrlaF-002TqQ-7D; Thu, 19 May 2022 13:13:15 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.94.2) (envelope-from ) id 1nrlaD-0004T9-0S; Thu, 19 May 2022 13:13:13 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Song Liu Cc: Christoph Hellwig , Guoqing Jiang , Xiao Ni , Stephen Bates , Martin Oliveira , David Sloan , Logan Gunthorpe Date: Thu, 19 May 2022 13:12:56 -0600 Message-Id: <20220519191311.17119-1-logang@deltatee.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, song@kernel.org, hch@infradead.org, guoqing.jiang@linux.dev, xni@redhat.com, sbates@raithlin.com, Martin.Oliveira@eideticom.com, David.Sloan@eideticom.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Subject: [PATCH v1 00/15] Bug fixes for mdadm tests X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This series includes fixes to fix all the kernel panics in the mdadm tests and some, related, sparse issues. The first 10 patches clean refactor the raid5-cache code so that the RCU usage of conf->log can be cleaned up which is done in patches 11 and 12 -- fixing some actual kernel NULL pointer dereference crashes in the mdadm test. Patch 13 fixes some of the remaining sparse warnings that are just missing __rcu annotations. Patches 14 and 15 fix a couple additional hangs in an mdadm test. This series also originally included a patch[1] to fix the mddev->private=NULL issue in raid0. That bug caused an mdadm tests to crash, but it seems Xiao beat me to the fix by a few days. Hopefully, this work to improve mdadm tests will mean these types of bugs will be caught much sooner, before merging. This series will be followed by another series for mdadm which fixes the segfaults and annotates some failing tests to make mdadm tests runnable fairly reliably, but I'll wait for a stable hash for this series to note the kernel version tested against. Following that, v3 of my lock contention series will be sent with more confidence of its correctness. This series is based on the current md/md-next branch as of today (6ad84d559b8c). A git branch is available here: https://github.com/sbates130272/linux-p2pmem md-bug Thanks, Logan [1] https://github.com/sbates130272/linux-p2pmem/commit/5a538f9f48d77cba111773759256bbc3ccaaa74a -- Logan Gunthorpe (15): md/raid5-log: Drop extern decorators for function prototypes md/raid5-cache: Refactor r5c_is_writeback() to take a struct r5conf md/raid5-cache: Refactor r5l_start() to take a struct r5conf md/raid5-cache: Refactor r5l_flush_stripe_to_raid() to take a struct r5conf md/raid5-cache: Refactor r5l_wake_reclaim() to take a struct r5conf md/raid5-cache: Refactor remaining functions to take a r5conf md/raid5-ppl: Drop unused argument from ppl_handle_flush_request() md/raid5-cache: Pass the log through to r5c_finish_cache_stripe() md/raid5-cache: Don't pass conf to r5c_calculate_new_cp() md/raid5-cache: Take struct r5l_log in r5c_log_required_to_flush_cache() md/raid5: Ensure array is suspended for calls to log_exit() md/raid5-cache: Add RCU protection to conf->log accesses md/raid5-cache: Annotate pslot with __rcu notation md: Ensure resync is reported after it starts md: Notify sysfs sync_completed in md_reap_sync_thread() drivers/md/md.c | 13 ++- drivers/md/raid5-cache.c | 240 ++++++++++++++++++++++++--------------- drivers/md/raid5-log.h | 103 ++++++++--------- drivers/md/raid5-ppl.c | 2 +- drivers/md/raid5.c | 50 ++++---- drivers/md/raid5.h | 2 +- 6 files changed, 231 insertions(+), 179 deletions(-) base-commit: 6ad84d559b8cbce9ab27a3a2658c438de867c98e -- 2.30.2