From patchwork Thu Feb 16 20:39:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13143789 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77B3FC61DA4 for ; Thu, 16 Feb 2023 20:39:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229482AbjBPUjr (ORCPT ); Thu, 16 Feb 2023 15:39:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjBPUjp (ORCPT ); Thu, 16 Feb 2023 15:39:45 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8B59CC0D for ; Thu, 16 Feb 2023 12:39:44 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 65731B82958 for ; Thu, 16 Feb 2023 20:39:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33A9CC433D2; Thu, 16 Feb 2023 20:39:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676579982; bh=8VPQKMFoc+cxsGYakxUHlLz/psc13YLtgg059UQ2xvQ=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=I25jEFacICTWYVSmDVJOsaGKTmIDgqn3/cDGKDA8i4bUydwSOUW914Jfh3n31+jl/ /2NrATiqxY61OIsZth52PBVO1Pl2jK7z+ze+4+PJZ/UyTtwLDgozTsuJMi9zjzzEpe +gEtOdTfQM4IY7qxF4NRbiv8wj7Kw8Kfi7oLuCSqZZMC/agewtHkTH7ZZPEG8g4r9e 7iJFRMNlec3dA4aWwP5qFoDS7JGBxpiMlWiqxZjYURnnKQGnbq4Fk2XL29ddBn7HB7 0VYH3YEwiHWKFn9qxIaz9QRC19ZnhSMyNWnzFftkqNOq4S73OXWPYov9M0B43NmRoc UrMb7uHFPrsvQ== Date: Thu, 16 Feb 2023 12:39:41 -0800 Subject: [PATCH 27/28] xfs: drop compatibility minimum log size computations for reflink From: "Darrick J. Wong" To: djwong@kernel.org Cc: Allison Henderson , allison.henderson@oracle.com, linux-xfs@vger.kernel.org Message-ID: <167657872774.3473407.8554373450859748211.stgit@magnolia> In-Reply-To: <167657872335.3473407.14628732092515467392.stgit@magnolia> References: <167657872335.3473407.14628732092515467392.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Allison Henderson Having established that we can reduce the minimum log size computation for filesystems with parent pointers or any newer feature, we should also drop the compat minlogsize code that we added when we reduced the transaction reservation size for rmap and reflink. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson --- fs/xfs/libxfs/xfs_log_rlimit.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fs/xfs/libxfs/xfs_log_rlimit.c b/fs/xfs/libxfs/xfs_log_rlimit.c index e5c606fb7a6a..74821c7fd0cc 100644 --- a/fs/xfs/libxfs/xfs_log_rlimit.c +++ b/fs/xfs/libxfs/xfs_log_rlimit.c @@ -91,6 +91,16 @@ xfs_log_calc_trans_resv_for_minlogblocks( { unsigned int rmap_maxlevels = mp->m_rmap_maxlevels; + /* + * Starting with the parent pointer feature, every new fs feature + * drops the oversized minimum log size computation introduced by the + * original reflink code. + */ + if (xfs_has_parent_or_newer_feature(mp)) { + xfs_trans_resv_calc(mp, resv); + return; + } + /* * In the early days of rmap+reflink, we always set the rmap maxlevels * to 9 even if the AG was small enough that it would never grow to