Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp25354pxh; Thu, 7 Apr 2022 12:53:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHx5oXT2PmTQa/PxixCK8q6z5w3feFcwtkwa+mbFquiFgnxkms8FD1ST8xxu0zsGcDRQ52 X-Received: by 2002:a17:90a:4890:b0:1bf:654e:e1a0 with SMTP id b16-20020a17090a489000b001bf654ee1a0mr17819156pjh.113.1649361230069; Thu, 07 Apr 2022 12:53:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649361230; cv=none; d=google.com; s=arc-20160816; b=GS4jM5cltumMLfqHk3/IWcJfaqn2g0137Hp/8llBZGpy0BgL6xEN19spJyO3uNAfeb M+PMg5KfMPSf7UUCDfV8dYsv8ANmdVnYIAPkvptgY0dlebmeVK+XPY15BRsSL2m5s4h8 gaezRNbkCBbGXGWG1bcJ99lUG4gCi4WQ998V2fWqDE4IMsLhaeipkcJhEkDEV+ISgy5X cPzSe9rBEy3IP/+Nv5sERDGbJqXUGseKh01gDDYpY1Az4TuSE5kef6kSLr5xEl/VauLD vegkgfswEHgshF49CI95dBc8ArHDhJ7Dwgd5OKaY6pND1zfZwqWai1tzx/2n8wZnluGw mGMw== 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=lUq08cdcUVP7geqUMO4Ev+0ju/xC3/Dyu2GujITehKs=; b=sbffrDLM/MnqHXT0yAHP1j/qgD2CTEC/WzEcAQLmx6gyx4fguqD8boP0xOSdarhmxY T60/9B+vO4D5bJnAX8IH+AqRHQm8pjYYnoPicf4BbSDO/+mARSAErSJypvBbbLTp7L09 wqq0CSUVBNGb1f0sYGxHVwXH4M9MLz3Tp54P2pmW1OIrJ3aLyXNBGCdM6FChEEJRLCCC Tya9n/Hq6OERNZd4CTLl+4g/SSskUbju2mkrTDtNSI+BY6zB1hUotO5IJ9lqu59/TuAr Mbuff9YSafUgs1xVWZ8XtP/8U6Vh5k9phTo9awc83ohCqvrZw6irzk6NSXJQ0iDVPGcV ZhzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=PYyrJt7e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y16-20020a170902b49000b001564f2a0782si550492plr.345.2022.04.07.12.53.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 12:53:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=PYyrJt7e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 825A0279717; Thu, 7 Apr 2022 12:24:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346188AbiDGRY0 (ORCPT + 99 others); Thu, 7 Apr 2022 13:24:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346083AbiDGRX6 (ORCPT ); Thu, 7 Apr 2022 13:23:58 -0400 Received: from ale.deltatee.com (ale.deltatee.com [204.191.154.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8106864F4; Thu, 7 Apr 2022 10:21:58 -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=lUq08cdcUVP7geqUMO4Ev+0ju/xC3/Dyu2GujITehKs=; b=PYyrJt7ewqHOGWsi3qiAGmkBH3 kfZnUZVWFOZkih3iCNvFDuyt8k4UgmY4gnUljez5mnh1LJrjJVrMUbkKnTsRKcskR3pJCsjf1YN7v FUX3AFBU3i/6jUyACSHWwTuJjsCH45O/NuetVOcgAfIhPFMFlGVRpi2G07A6KcKiE+B9UDenB1Rgj /qODeNf94xzKtPQkQ/Rh8JSYTNkGyJDcQKJZDsZ5lWoNdeSA/W/H4qxNDP0BKOWfKkwXIyhX6iEEz TSwJSmQ+Zjd8WOV/Lk0rytSx3AVDQRSVTtmy+TAzmk0FHUAC8Fg94+BCBVjANwmMFVPQIdmgtxC8t Do7rkeBQ==; 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 1ncVRf-002CRe-HG; Thu, 07 Apr 2022 10:57:20 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.94.2) (envelope-from ) id 1ncVRe-0002Pz-O1; Thu, 07 Apr 2022 10:57:18 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Song Liu Cc: Guoqing Jiang , Logan Gunthorpe Date: Thu, 7 Apr 2022 10:57:06 -0600 Message-Id: <20220407165713.9243-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, guoqing.jiang@linux.dev, 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, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Subject: [PATCH v1 0/7] Minor Raid5 Fixes and Cleanup 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 contains a few cleanup and minor fixes to the raid5 code to make it a bit easier to hack on. Patch 1 cleans up the error returns in setup_conf() (I had an abandonded patch that added another error out and needed this clean more sensible). Patch 2 fixes a sparse warning with the raid5_percpu structure. Patch 3 through 6 fixes sparse warnings related to missing __rcu annotations when using the RCU calls. Patch 7 just adds some basic __must_hold annotations for the device_lock to any function that is called while holding the lock. Sparse doesn't really check this, but the annotation makes the locks a little easier to analyze. Thanks, Logan -- Logan Gunthorpe (7): md/raid5: Cleanup setup_conf() error returns md/raid5: Un-nest struct raid5_percpu definition md/raid5: Add __rcu annotation to struct disk_info md/raid5: Annotate rdev/replacement accesses when nr_pending is elevated md/raid5: Annotate rdev/replacement access when mddev_lock is held md/raid5-ppl: Annotate with rcu_dereference_protected() md/raid5: Annotate functions that hold device_lock with __must_hold drivers/md/raid5-ppl.c | 13 ++- drivers/md/raid5.c | 179 ++++++++++++++++++++++++++--------------- drivers/md/raid5.h | 23 +++--- 3 files changed, 139 insertions(+), 76 deletions(-) base-commit: 3123109284176b1532874591f7c81f3837bbdc17 -- 2.30.2