From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 19BDEA95D; Sun, 16 Mar 2025 06:17:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742105833; cv=none; b=RP01GWUWtDJ7BUF/HLbVfyu1nhEfA0Mm/kcVIgfH4giGPv6qxWlFLpKGe7SgaBWpVpEIdQWZPrPcwLqRMxPGtxOVt+HoJPjEwaXG4ilyjt6q0d/2wCJOaxvmNSER59hQpY1S3nUR7C1voxzYx4Adb/JSUX+F1eOBdKRWdmiCAHE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742105833; c=relaxed/simple; bh=4ZrnHXlQSMU4iZC7UquYZGfD2su4KW1iTwKe4HGHFaA=; h=Subject:To:Cc:From:Date:In-Reply-To:Message-ID:MIME-Version: Content-Type; b=UbEdDxolXYFui+L1mPkB6dn28KmdwXrAVCcoJyErS2cwsM0kvdpR1rr7ax8FH8nWz6GAJAxP1KwujA0B3KUz0ta4Wbw8W1sy3+SKacRGxFAEkhaMB56r6PzyDdhw4ByvCVi1OLi88J9OwuTlT7rHMf8ytW6LGzei9gbZkbk474E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VcDEOYUg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="VcDEOYUg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 934A2C4CEDD; Sun, 16 Mar 2025 06:17:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1742105832; bh=4ZrnHXlQSMU4iZC7UquYZGfD2su4KW1iTwKe4HGHFaA=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=VcDEOYUg1kyeGBCnyFc5GALNpVGxVfCc4YQ0MkXMSr8x2JdXfZ9ox24qSxgv2YHpS /LV84BP1Pq1xUoZTV9UqPM2hdBGd7zGzil425y0eP685VwLI9P3ZwGtnoAhgfbYeq0 ar/zaQyY199jPhRIQO4eziY4+AhKIR4LerGxMo2s= Subject: Patch "xfs: convert rt bitmap extent lengths to xfs_rtbxlen_t" has been added to the 6.1-stable tree To: catherine.hoang@oracle.com,djwong@kernel.org,gregkh@linuxfoundation.org,hch@lst.de,leah.rumancik@gmail.com,xfs-stable@lists.linux.dev Cc: From: Date: Sun, 16 Mar 2025 07:17:05 +0100 In-Reply-To: <20250313202550.2257219-12-leah.rumancik@gmail.com> Message-ID: <2025031605-succulent-securely-3a17@gregkh> Precedence: bulk X-Mailing-List: xfs-stable@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit X-stable: commit X-Patchwork-Hint: ignore This is a note to let you know that I've just added the patch titled xfs: convert rt bitmap extent lengths to xfs_rtbxlen_t to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: xfs-convert-rt-bitmap-extent-lengths-to-xfs_rtbxlen_t.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From stable+bounces-124368-greg=kroah.com@vger.kernel.org Thu Mar 13 21:26:27 2025 From: Leah Rumancik Date: Thu, 13 Mar 2025 13:25:31 -0700 Subject: xfs: convert rt bitmap extent lengths to xfs_rtbxlen_t To: stable@vger.kernel.org Cc: xfs-stable@lists.linux.dev, "Darrick J. Wong" , Christoph Hellwig , Catherine Hoang , Greg Kroah-Hartman , Leah Rumancik Message-ID: <20250313202550.2257219-12-leah.rumancik@gmail.com> From: "Darrick J. Wong" [ Upstream commit f29c3e745dc253bf9d9d06ddc36af1a534ba1dd0 ] [ 6.1: excluded changes to trace.h as xchk_rtsum_record_free does not exist yet ] XFS uses xfs_rtblock_t for many different uses, which makes it much more difficult to perform a unit analysis on the codebase. One of these (ab)uses is when we need to store the length of a free space extent as stored in the realtime bitmap. Because there can be up to 2^64 realtime extents in a filesystem, we need a new type that is larger than xfs_rtxlen_t for callers that are querying the bitmap directly. This means scrub and growfs. Create this type as "xfs_rtbxlen_t" and use it to store 64-bit rtx lengths. 'b' stands for 'bitmap' or 'big'; reader's choice. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Catherine Hoang Acked-by: Darrick J. Wong Signed-off-by: Greg Kroah-Hartman Signed-off-by: Leah Rumancik Acked-by: "Darrick J. Wong" Signed-off-by: Greg Kroah-Hartman --- fs/xfs/libxfs/xfs_format.h | 2 +- fs/xfs/libxfs/xfs_rtbitmap.h | 2 +- fs/xfs/libxfs/xfs_types.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) --- a/fs/xfs/libxfs/xfs_format.h +++ b/fs/xfs/libxfs/xfs_format.h @@ -98,7 +98,7 @@ typedef struct xfs_sb { uint32_t sb_blocksize; /* logical block size, bytes */ xfs_rfsblock_t sb_dblocks; /* number of data blocks */ xfs_rfsblock_t sb_rblocks; /* number of realtime blocks */ - xfs_rtblock_t sb_rextents; /* number of realtime extents */ + xfs_rtbxlen_t sb_rextents; /* number of realtime extents */ uuid_t sb_uuid; /* user-visible file system unique id */ xfs_fsblock_t sb_logstart; /* starting block of log if internal */ xfs_ino_t sb_rootino; /* root inode number */ --- a/fs/xfs/libxfs/xfs_rtbitmap.h +++ b/fs/xfs/libxfs/xfs_rtbitmap.h @@ -13,7 +13,7 @@ */ struct xfs_rtalloc_rec { xfs_rtblock_t ar_startext; - xfs_rtblock_t ar_extcount; + xfs_rtbxlen_t ar_extcount; }; typedef int (*xfs_rtalloc_query_range_fn)( --- a/fs/xfs/libxfs/xfs_types.h +++ b/fs/xfs/libxfs/xfs_types.h @@ -31,6 +31,7 @@ typedef uint64_t xfs_rfsblock_t; /* bloc typedef uint64_t xfs_rtblock_t; /* extent (block) in realtime area */ typedef uint64_t xfs_fileoff_t; /* block number in a file */ typedef uint64_t xfs_filblks_t; /* number of blocks in a file */ +typedef uint64_t xfs_rtbxlen_t; /* rtbitmap extent length in rtextents */ typedef int64_t xfs_srtblock_t; /* signed version of xfs_rtblock_t */ Patches currently in stable-queue which might be from leah.rumancik@gmail.com are queue-6.1/xfs-fix-confusing-xfs_extent_item-variable-names.patch queue-6.1/xfs-fix-32-bit-truncation-in-xfs_compute_rextslog.patch queue-6.1/xfs-transfer-recovered-intent-item-ownership-in-iop_recover.patch queue-6.1/xfs-initialise-di_crc-in-xfs_log_dinode.patch queue-6.1/xfs-consider-minlen-sized-extents-in-xfs_rtallocate_extent_block.patch queue-6.1/xfs-don-t-leak-recovered-attri-intent-items.patch queue-6.1/xfs-remove-unused-fields-from-struct-xbtree_ifakeroot.patch queue-6.1/xfs-fix-bounds-check-in-xfs_defer_agfl_block.patch queue-6.1/xfs-ensure-logflagsp-is-initialized-in-xfs_bmap_del_extent_real.patch queue-6.1/xfs-convert-rt-bitmap-extent-lengths-to-xfs_rtbxlen_t.patch queue-6.1/xfs-pass-refcount-intent-directly-through-the-log-intent-code.patch queue-6.1/xfs-fix-perag-leak-when-growfs-fails.patch queue-6.1/xfs-pass-the-xfs_defer_pending-object-to-iop_recover.patch queue-6.1/xfs-update-dir3-leaf-block-metadata-after-swap.patch queue-6.1/xfs-use-deferred-frees-for-btree-block-freeing.patch queue-6.1/xfs-make-rextslog-computation-consistent-with-mkfs.patch queue-6.1/xfs-pass-xfs_extent_free_item-directly-through-the-log-intent-code.patch queue-6.1/xfs-move-the-xfs_rtbitmap.c-declarations-to-xfs_rtbitmap.h.patch queue-6.1/xfs-recompute-growfsrtfree-transaction-reservation-while-growing-rt-volume.patch queue-6.1/xfs-reserve-less-log-space-when-recovering-log-intent-items.patch queue-6.1/xfs-pass-the-xfs_bmbt_irec-directly-through-the-log-intent-code.patch queue-6.1/xfs-force-all-buffers-to-be-written-during-btree-bulk-load.patch queue-6.1/xfs-reset-xfs_attr_incomplete-filter-on-node-removal.patch queue-6.1/xfs-add-lock-protection-when-remove-perag-from-radix-tree.patch queue-6.1/xfs-use-xfs_defer_pending-objects-to-recover-intent-items.patch queue-6.1/xfs-pass-per-ag-references-to-xfs_free_extent.patch queue-6.1/xfs-validate-block-number-being-freed-before-adding-to-xefi.patch queue-6.1/xfs-don-t-allow-overly-small-or-large-realtime-volumes.patch queue-6.1/xfs-remove-conditional-building-of-rt-geometry-validator-functions.patch