From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF2F5C433B4 for ; Thu, 15 Apr 2021 03:59:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7CC9D61154 for ; Thu, 15 Apr 2021 03:59:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229698AbhDOD7s (ORCPT ); Wed, 14 Apr 2021 23:59:48 -0400 Received: from mail108.syd.optusnet.com.au ([211.29.132.59]:42263 "EHLO mail108.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbhDOD7r (ORCPT ); Wed, 14 Apr 2021 23:59:47 -0400 Received: from dread.disaster.area (pa49-181-239-12.pa.nsw.optusnet.com.au [49.181.239.12]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 51ED81AEFB7; Thu, 15 Apr 2021 13:59:22 +1000 (AEST) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1lWt9x-008bto-O2; Thu, 15 Apr 2021 13:59:17 +1000 Date: Thu, 15 Apr 2021 13:59:17 +1000 From: Dave Chinner To: Gao Xiang Cc: linux-xfs@vger.kernel.org Subject: Re: [RFC PATCH 3/4] xfs: introduce max_agcount Message-ID: <20210415035917.GL63242@dread.disaster.area> References: <20210414195240.1802221-1-hsiangkao@redhat.com> <20210414195240.1802221-4-hsiangkao@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210414195240.1802221-4-hsiangkao@redhat.com> X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=Tu+Yewfh c=1 sm=1 tr=0 cx=a_idp_f a=gO82wUwQTSpaJfP49aMSow==:117 a=gO82wUwQTSpaJfP49aMSow==:17 a=kj9zAlcOel0A:10 a=3YhXtTcJ-WEA:10 a=7-415B0cAAAA:8 a=jeGcm7KesAy5_L4LVp0A:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org On Thu, Apr 15, 2021 at 03:52:39AM +0800, Gao Xiang wrote: > After shrinking, some inactive AGs won't be valid anymore except > that these perags are still here. Introduce a new m_maxagcount > mainly used for freeing all perags. With active/passive perag references, I don't think this is necessary anymore. By the time we get to changing mp->m_sb.sb_agblocks, we've already guaranteed that there is nothing referencing the perag structures we are about to get rid of. And if we do a lookup on a agno we've already removed, it'll fail anyway because that perag can't be found in the radix tree.... Cheers, Dave. -- Dave Chinner david@fromorbit.com