From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6478429CDB; Thu, 16 Jul 2026 13:48:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784209712; cv=none; b=tNTEKpA/F5Hl0OLl8nS5gHyuHRFHYVMwRE43KcSJaKgodbweYXJG53IeH8MaXQHBc5FGd2aizXWVoic6a2wcK8CF2w1Tt0tMlGGGK4mnGVPAu5MC1Lor3eRB366+xa2Vv4NJP79AJSb1c5ZNdXto5TGVR2iPWaamYxF1z0FQt4E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784209712; c=relaxed/simple; bh=cXXyahhwUcaqDMZjZRrZOZ9NJS/o+FSbyLaAX+a1vjY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZWUmoXJXddX6hv1DDA8upeEHxUOQ+ahtaMKiraY4LJcHGeKaGEygdXi6D93GKknkvjiIfiAYGAByl4uH3BjbU/qtlzRW/NnDjvt8uiVhKabmZKd8Gfy36N7nD4Dau1S3uobA9uHkcfPxNS0IMM7YG3iZqIt1ejoHX5q3sWrC4Ks= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Qz8Ayrxc; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Qz8Ayrxc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36EC11F000E9; Thu, 16 Jul 2026 13:48:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784209699; bh=aehs+cxsWJDkhENIlKrqZKd72ts/AZd3i0Q3G9XShXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Qz8Ayrxc2CXFTtZgvLIoqk025lG3jkRFRsBN2YkHinCN/+13a9kJVjzAOYvkZ1s9Y H2ly/s8MDGg/FbvrQtsrBx0pkoL6owbnTa1iL/8w0iUbj7VVpvG066+gT0v8La/Mul tiqHlApgTvAEtwnv8ktVIiFlAFe1URL+vyGuxJpM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christoph Hellwig , "Darrick J. Wong" , Damien Le Moal , Carlos Maiolino Subject: [PATCH 7.1 285/518] xfs: only log freed extents for the current RTG in zoned growfs Date: Thu, 16 Jul 2026 15:29:13 +0200 Message-ID: <20260716133054.054150663@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260716133047.772246337@linuxfoundation.org> References: <20260716133047.772246337@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christoph Hellwig commit 44cccefe65749821d9a13523c8b763bf1262ef73 upstream. Otherwise a power fail or crash during growfs could lead to an elevated sb_rblocks counter. Note that the step function is much simpler compared to the classic RT allocator as zoned RT sections must be aligned to real time group boundaries. Fixes: 01b71e64bb87 ("xfs: support growfs on zoned file systems") Cc: # v6.15 Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Reviewed-by: Damien Le Moal Signed-off-by: Carlos Maiolino Signed-off-by: Greg Kroah-Hartman --- fs/xfs/xfs_rtalloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -890,8 +890,7 @@ xfs_growfs_rt_sb_fields( static int xfs_growfs_rt_zoned( - struct xfs_rtgroup *rtg, - xfs_rfsblock_t nrblocks) + struct xfs_rtgroup *rtg) { struct xfs_mount *mp = rtg_mount(rtg); struct xfs_mount *nmp; @@ -903,7 +902,8 @@ xfs_growfs_rt_zoned( * Calculate new sb and mount fields for this round. Also ensure the * rtg_extents value is uptodate as the rtbitmap code relies on it. */ - nmp = xfs_growfs_rt_alloc_fake_mount(mp, nrblocks, + nmp = xfs_growfs_rt_alloc_fake_mount(mp, + xfs_rtgs_to_rfsbs(mp, rtg_rgno(rtg) + 1), mp->m_sb.sb_rextsize); if (!nmp) return -ENOMEM; @@ -1218,7 +1218,7 @@ xfs_growfs_rtg( } if (xfs_has_zoned(mp)) { - error = xfs_growfs_rt_zoned(rtg, nrblocks); + error = xfs_growfs_rt_zoned(rtg); goto out_rele; }