Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp536286imn; Thu, 28 Jul 2022 08:12:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1up0V9djxIhAbSZpV2XYy0OP9S6u0wPhLFObxdncDsjuIC2V27nL9sig6NEZ+DLq4Mh+qiu X-Received: by 2002:a17:902:70c4:b0:16c:5306:9172 with SMTP id l4-20020a17090270c400b0016c53069172mr27127405plt.171.1659021138246; Thu, 28 Jul 2022 08:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659021138; cv=none; d=google.com; s=arc-20160816; b=0rA6mCHTXGUAUR8fZt35z2luCqPR42px58CjOcUapYO7y9SPH7FyEbB+Gn2G7z2hNr PPZAW5iJO7cCV5ifXzW5F3OAZFEutBBEKrRXQwXHRJNzDTg5QDbLh4WZ8v+KKA585FFh iT8igujRS89BPsCIqqo+72ynO4W3SceG9PaUv7Rks2Ofjvg+myWx72Unr1npwOXgrmbz i+04G4Vlj5IF/CVgN3pgpfM7mqXQBZP2Qb+A397znvE9w6kZNnwrFjaYZPNnv9nlSzK8 u8wGvTVZCG28/piABLgB7XECg5VoLZGnq7Btl1+XihnoCnHF8F0OeTeLB1ZojAnxIhN/ oy+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nXX/1YHq2TsMnhQqeM+NuFCn+OKgy8tv053unKPt3R0=; b=Biv2TfA9tF9DtJG5ucR6Jbeod5ACYHN0fsqYbqb530QLblnYxEu6ViD5dfQFoEzcsD CBkXTs+c9MkKOHdlfaUEn6v9/lKYkvfpAEi2ib6xul0AEvCsLETp6jGR539hm1PlQfX8 lXQyC9bPf02Zie+8dCF2MfiiownE+J04EyWM+2QcM5yQ6yPqY9tWnufgD97Xct9yLBoQ A0S8cqjVIwdaFc/obiGSHPJLKIsl9gcoQ6tJJXgFeXpwdVPHw/dWfO3X2sqAB5aDmwxt 5yvLHcYNNKNvWHd6J7bR510dZl+JYJNt/m7IJy4dhrscKtJe6JuV1QQt4KVGdiuy+Omk LfIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ta9JJEQZ; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f85-20020a623858000000b0050dcc1acf09si871423pfa.111.2022.07.28.08.12.02; Thu, 28 Jul 2022 08:12:18 -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; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ta9JJEQZ; 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 S230463AbiG1OOc (ORCPT + 99 others); Thu, 28 Jul 2022 10:14:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230150AbiG1OOa (ORCPT ); Thu, 28 Jul 2022 10:14:30 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D5DB642F; Thu, 28 Jul 2022 07:14:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=nXX/1YHq2TsMnhQqeM+NuFCn+OKgy8tv053unKPt3R0=; b=ta9JJEQZKGgBVxJI6tJt3dr2ds RUia5KN/UmAeshBO1MpbxTl2OlzB5QsePDR+VO08ajYNYaAqtXNSK9dtVNH/1u7FQnueNHt23qhyw fI51m09kIvOptLurZyTNCn+xlhD7PO6PyK3xMmjOo2zImS/UqF67N/3Sn8GZXsVZ9+MMVQ/IUwgl6 JGFwbxKmKSDyrba/Bo+babp+ZqrjusLR9FjyROTgl24Wl1LMcUVJVBigsLEw+BUyjmq6PNxQwr2t5 fwHvesz3WA+zCkZbbz5LUNZ4P7dmEl27V+52reX5HlbYlc3C5epK58ukerVUPYx+y9Zz8sAaviyXl 7IkzOtpg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oH4HU-00A2G2-Vs; Thu, 28 Jul 2022 14:14:28 +0000 Date: Thu, 28 Jul 2022 07:14:28 -0700 From: Christoph Hellwig To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Song Liu , Christoph Hellwig , Guoqing Jiang , Stephen Bates , Martin Oliveira , David Sloan Subject: Re: [PATCH 2/5] md/raid5: Make is_inactive_blocked() helper Message-ID: References: <20220727210600.120221-1-logang@deltatee.com> <20220727210600.120221-3-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220727210600.120221-3-logang@deltatee.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE 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 On Wed, Jul 27, 2022 at 03:05:57PM -0600, Logan Gunthorpe wrote: > + int active = atomic_read(&conf->active_stripes); > + > + if (list_empty(conf->inactive_list + hash)) > + return false; > + > + if (!test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) > + return true; > + > + return active < (conf->max_nr_stripes * 3 / 4); Wy does this reed ->active_stripes without even knowing if that is needed? In fact I don't see the point of the local active variable at all.