From: Chandan Babu R <chandan.babu@oracle.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: darrick.wong@oracle.com, linux-xfs@vger.kernel.org,
allison.henderson@oracle.com
Subject: Re: [PATCH 2/3] design: document the large extent count ondisk format changes
Date: Tue, 24 Jan 2023 11:00:22 +0530 [thread overview]
Message-ID: <878rhslcse.fsf@debian-BULLSEYE-live-builder-AMD64> (raw)
In-Reply-To: <167400163305.1925795.9512359158912946568.stgit@magnolia>
On Tue, Jan 17, 2023 at 04:45:05 PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Update the ondisk format documentation to discuss the larger maximum
> extent counts that were added in 2022.
>
Looks good to me.
Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
--
chandan
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
> .../allocation_groups.asciidoc | 4 +
> .../XFS_Filesystem_Structure/ondisk_inode.asciidoc | 61 ++++++++++++++++++--
> 2 files changed, 58 insertions(+), 7 deletions(-)
>
>
> diff --git a/design/XFS_Filesystem_Structure/allocation_groups.asciidoc b/design/XFS_Filesystem_Structure/allocation_groups.asciidoc
> index 7ee5d561..c64b4fad 100644
> --- a/design/XFS_Filesystem_Structure/allocation_groups.asciidoc
> +++ b/design/XFS_Filesystem_Structure/allocation_groups.asciidoc
> @@ -454,6 +454,10 @@ xref:Timestamps[timestamps] for more information.
> The filesystem is not in operable condition, and must be run through
> xfs_repair before it can be mounted.
>
> +| +XFS_SB_FEAT_INCOMPAT_NREXT64+ |
> +Large file fork extent counts. This greatly expands the maximum number of
> +space mappings allowed in data and extended attribute file forks.
> +
> |=====
>
> *sb_features_log_incompat*::
> diff --git a/design/XFS_Filesystem_Structure/ondisk_inode.asciidoc b/design/XFS_Filesystem_Structure/ondisk_inode.asciidoc
> index 1922954e..34c06487 100644
> --- a/design/XFS_Filesystem_Structure/ondisk_inode.asciidoc
> +++ b/design/XFS_Filesystem_Structure/ondisk_inode.asciidoc
> @@ -84,14 +84,41 @@ struct xfs_dinode_core {
> __uint32_t di_nlink;
> __uint16_t di_projid;
> __uint16_t di_projid_hi;
> - __uint8_t di_pad[6];
> - __uint16_t di_flushiter;
> + union {
> + /* Number of data fork extents if NREXT64 is set */
> + __be64 di_big_nextents;
> +
> + /* Padding for V3 inodes without NREXT64 set. */
> + __be64 di_v3_pad;
> +
> + /* Padding and inode flush counter for V2 inodes. */
> + struct {
> + __u8 di_v2_pad[6];
> + __be16 di_flushiter;
> + };
> + };
> xfs_timestamp_t di_atime;
> xfs_timestamp_t di_mtime;
> xfs_timestamp_t di_ctime;
> xfs_fsize_t di_size;
> xfs_rfsblock_t di_nblocks;
> xfs_extlen_t di_extsize;
> + union {
> + /*
> + * For V2 inodes and V3 inodes without NREXT64 set, this
> + * is the number of data and attr fork extents.
> + */
> + struct {
> + __be32 di_nextents;
> + __be16 di_anextents;
> + } __packed;
> +
> + /* Number of attr fork extents if NREXT64 is set. */
> + struct {
> + __be32 di_big_anextents;
> + __be16 di_nrext64_pad;
> + } __packed;
> + } __packed;
> xfs_extnum_t di_nextents;
> xfs_aextnum_t di_anextents;
> __uint8_t di_forkoff;
> @@ -162,7 +189,7 @@ When the number exceeds 65535, the inode is converted to v2 and the link count
> is stored in +di_nlink+.
>
> *di_uid*::
> -Specifies the owner's UID of the inode.
> +Specifies the owner's UID of the inode.
>
> *di_gid*::
> Specifies the owner's GID of the inode.
> @@ -181,10 +208,17 @@ Specifies the high 16 bits of the owner's project ID in v2 inodes, if the
> +XFS_SB_VERSION2_PROJID32BIT+ feature is set; and zero otherwise.
>
> *di_pad[6]*::
> -Reserved, must be zero.
> +Reserved, must be zero. Only exists for v2 inodes.
>
> *di_flushiter*::
> -Incremented on flush.
> +Incremented on flush. Only exists for v2 inodes.
> +
> +*di_v3_pad*::
> +Must be zero for v3 inodes without the NREXT64 flag set.
> +
> +*di_big_nextents*::
> +Specifies the number of data extents associated with this inode if the NREXT64
> +flag is set. This allows for up to 2^48^ - 1 extent mappings.
>
> *di_atime*::
>
> @@ -231,10 +265,19 @@ file is written to beyond allocated space, XFS will attempt to allocate
> additional disk space based on this value.
>
> *di_nextents*::
> -Specifies the number of data extents associated with this inode.
> +Specifies the number of data extents associated with this inode if the NREXT64
> +flag is not set. Supports up to 2^31^ - 1 extents.
>
> *di_anextents*::
> -Specifies the number of extended attribute extents associated with this inode.
> +Specifies the number of extended attribute extents associated with this inode
> +if the NREXT64 flag is not set. Supports up to 2^15^ - 1 extents.
> +
> +*di_big_anextents*::
> +Specifies the number of extended attribute extents associated with this inode
> +if the NREXT64 flag is set. Supports up to 2^32^ - 1 extents.
> +
> +*di_nrext64_pad*::
> +Must be zero if the NREXT64 flag is set.
>
> *di_forkoff*::
> Specifies the offset into the inode's literal area where the extended attribute
> @@ -336,6 +379,10 @@ This inode shares (or has shared) data blocks with another inode.
> For files, this is the extent size hint for copy on write operations; see
> +di_cowextsize+ for details. For directories, the value in +di_cowextsize+
> will be copied to all newly created files and directories.
> +| +XFS_DIFLAG2_NREXT64+ |
> +Files with this flag set may have up to (2^48^ - 1) extents mapped to the data
> +fork and up to (2^32^ - 1) extents mapped to the attribute fork. This flag
> +requires the +XFS_SB_FEAT_INCOMPAT_NREXT64+ feature to be enabled.
> |=====
>
> *di_cowextsize*::
next prev parent reply other threads:[~2023-01-24 5:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-18 0:42 [PATCHSET 0/3] xfs-documentation: updates for 6.1 Darrick J. Wong
2023-01-18 0:44 ` [PATCH 1/3] design: update group quota inode information for v5 filesystems Darrick J. Wong
2023-01-24 5:29 ` Chandan Babu R
2023-01-18 0:45 ` [PATCH 2/3] design: document the large extent count ondisk format changes Darrick J. Wong
2023-01-24 5:30 ` Chandan Babu R [this message]
2023-01-18 0:45 ` [PATCH 3/3] design: document extended attribute log item changes Darrick J. Wong
2023-01-24 5:30 ` Chandan Babu R
2023-01-25 1:20 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878rhslcse.fsf@debian-BULLSEYE-live-builder-AMD64 \
--to=chandan.babu@oracle.com \
--cc=allison.henderson@oracle.com \
--cc=darrick.wong@oracle.com \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox