Darrick J. Wong [Fri, 23 Aug 2024 00:05:15 +0000 (17:05 -0700)]
Merge tag 'xfsdocs-6.10-updates_2024-08-22' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-documentation into mainn
xfs-documentation: updates for 6.10 [1/5]
Here's a pile of updates detailing the changes made during 2023 and 2024 for
kernel 6.10.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
* tag 'xfsdocs-6.10-updates_2024-08-22' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-documentation:
design: fix the changelog to reflect the new changes
design: document the metadump v2 format
design: document the parent pointer ondisk format
design: document new logged parent pointer attribute variants
design: document atomic file mapping exchange log intent structures
Csaba Henk [Tue, 17 Jan 2023 17:47:40 +0000 (09:47 -0800)]
xfsdocs: add epub output
Epub is a widespread open format for standalone reflowable
electronic documents, and it's a core feature of Asciidoc tooling
to be able to produce it, so we can get it "for free".
Signed-off-by: Csaba Henk <chenk@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Darrick J. Wong [Thu, 21 Jul 2022 04:24:04 +0000 (21:24 -0700)]
xfsdocs: fix a minor levelling problem
Fix these incorrect heading levels.
asciidoc: WARNING: allocation_groups.asciidoc: line 1089: section title out of sequence: expected level 3, got level 4
asciidoc: WARNING: allocation_groups.asciidoc: line 1218: section title out of sequence: expected level 3, got level 4
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
There has a typo for 'logical file block offset' part, it writes 'bits
72 to 126', but it should be 'bits 73 to 126' because the 72st bit is
consumed by 'absolute block number' part, this patch fix this problem
and redrawing the image as below:
Signed-off-by: Xiaole He <hexiaole@kylinos.cn> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
[djwong: convert the raw table into asciidoc and remove the png] Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Xiaole He [Mon, 18 Jul 2022 17:13:37 +0000 (10:13 -0700)]
xfsdocs: fix inode timestamps lower limit value
In kernel source tree 'fs/xfs/libxfs/xfs_format.h', there defined inode
timestamps as 'xfs_legacy_timestamp' if the 'bigtime' feature disabled,
and also defined the min and max time constants 'XFS_LEGACY_TIME_MIN'
and 'XFS_LEGACY_TIME_MAX' as below:
When the 't_sec' and 't_nsec' are 0, the time value it represents is
1970-01-01 00:00:00 UTC, the 'XFS_LEGACY_TIME_MIN', that is -(2^31),
represents the min second offset relative to the
1970-01-01 00:00:00 UTC, it can be converted to human-friendly time
value by 'date' command:
/* command begin */
[root@~]# date --utc -d '@0' +'%Y-%m-%d %H:%M:%S'
1970-01-01 00:00:00
[root@~]# date --utc -d "@`echo '-(2^31)'|bc`" +'%Y-%m-%d %H:%M:%S'
1901-12-13 20:45:52
[root@~]#
/* command end */
That is, the min time value is 1901-12-13 20:45:52 UTC, but the
'design/XFS_Filesystem_Structure/timestamps.asciidoc' write the min
time value as 'The smalle st date this format can represent is
20:45:52 UTC on December 31st', there should be a typo, and this patch
correct 2 places of wrong min time value, from '31st' to '13st'.
Signed-off-by: Xiaole He <hexiaole@kylinos.cn> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Darrick J. Wong [Wed, 10 Nov 2021 01:38:57 +0000 (17:38 -0800)]
design: fix computation of buffer log item bitmap size
Wengang Wang was trying to work through a buffer log item by consulting
the ondisk format documentation, and was confused by the formula given
in section 14.3.14 regarding the size of blf_data_map, aka the dirty
bitmap for buffer log items. We noticed that the documentation doesn't
match what the kernel actually does, so let's fix this.
Reported-by: Wengang Wang <wen.gang.wang@oracle.com> Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
Lukas Herbolt [Fri, 26 Mar 2021 02:47:00 +0000 (19:47 -0700)]
xfsdocs: Small fix to correct first free inode to be 5847 not 5856.
Fix a minor math error in the demonstration of inode btrees.
Signed-off-by: Lukas Herbolt <lukas@herbolt.com>
[djwong: tweak the commit message a bit] Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Darrick J. Wong [Wed, 8 Apr 2020 22:52:53 +0000 (15:52 -0700)]
xfsdocs: capture some information about dirs vs. attrs and how they use dabtrees
Dave and I had a short discussion about whether or not xattr trees
needed to have the same free space tracking that directories have, and
a comparison of how each of the two metadata types interact with
dabtrees resulted. I've reworked this a bit to make it flow better as a
book chapter, so here we go.
Original-mail: https://lore.kernel.org/linux-xfs/20200404085203.1908-1-chandanrlinux@gmail.com/T/#mdd12ad06cf5d635772cc38946fc5b22e349e136f
Originally-from: Dave Chinner <david@fromorbit.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Bill O'Donnell <billodo@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Replace "possible" with "possibly" and improve the flow of the phrase.
Signed-off-by: Sheriff Esseson <sheriffesseson@gmail.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Andrea Gelmini [Tue, 18 Jun 2019 17:05:23 +0000 (10:05 -0700)]
Fix typos in xfs-documentation
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
[darrick: change 'gleaned' to 'collected' in refcount docs] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Marco Benatto [Tue, 7 Aug 2018 15:11:04 +0000 (08:11 -0700)]
design: Document project quota inode
A project quota inode was introduced into V5 superblock allowing
project quotas and group quotas to be used simultaneously. However
on "Quota Inodes" section we still mention it's not possible to
use project and group quotas at sametime.
This patch documents this behavior for V5 and later superblocks,
while keeps documented the old behavior for earlier versions.
Signed-off-by: Marco Benatto <mbenatto@redhat.com>
[darrick: rephrase slightly] Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Darrick J. Wong [Wed, 18 Oct 2017 04:55:49 +0000 (21:55 -0700)]
xfsdocs: fix description of directory free block nvalid and nused header fields
The descriptions of the directory free block header's nvalid and nused
fields are backwards, so flip them. While we're fixing them, augment
the description to relate it to the rest of the directory structure.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Darrick J. Wong [Tue, 10 Jan 2017 22:51:52 +0000 (14:51 -0800)]
docs: clarify what the ATTRBIT and ATTR2BIT feature flags do
It would seem that the disk format doesn't actually change depending on
ATTRBIT and ATTR2BIT. The key difference is that ATTR2BIT (without the
'noattr2' mount option) allows di_forkoff to change depending on how
much space the attr fork needs, whereas ATTRBIT (without ATTR2BIT or
the 'attr2' mount option) does not allow di_forkoff to change.
In other words, at least one of the bits must be set if there are
extended attributes, but between the two bits the only difference is a
change in the default di_forkoff adjustment behaviors.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Darrick J. Wong [Tue, 18 Oct 2016 01:26:51 +0000 (18:26 -0700)]
docs: update refcount btree to reflect new cow staging extent policy
We now record the extents being used to stage a copy on write operation
in the refcount btree with the high bit of rc_startblock set and a
reference count of 1. Setting the high bit helps us reduce CoW GC time
at mount by moving all the records to the right side of the tree.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Darrick J. Wong [Thu, 8 Sep 2016 03:33:43 +0000 (13:33 +1000)]
xfsdocs: document the realtime reverse mapping btree
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Thu, 8 Sep 2016 03:33:31 +0000 (13:33 +1000)]
xfsdocs: document refcount btree and reflink
Document the reference count btree and talk a little bit about how
the reflink feature uses it.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Thu, 8 Sep 2016 03:33:23 +0000 (13:33 +1000)]
xfsdocs: reverse-mapping btree documentation
Add chapters on the operation of the reverse mapping btree and future
things we could do with rmap data.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Thu, 8 Sep 2016 03:33:12 +0000 (13:33 +1000)]
xfsdocs: move the discussions of short and long format btrees to a separate chapter
Move the discussion of short and long format btrees into a separate
chapter.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Thu, 8 Sep 2016 03:33:02 +0000 (13:33 +1000)]
xfsdocs: update the on-disk format with changes for Linux 4.5
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Thu, 8 Sep 2016 03:32:48 +0000 (13:32 +1000)]
xfsdocs: document known testing procedures
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Thu, 8 Sep 2016 03:32:35 +0000 (13:32 +1000)]
journaling_log: fix some typos in the section about EFDs
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Mon, 4 Jan 2016 23:29:19 +0000 (10:29 +1100)]
restore the old rendering of structure field definitions
Restore the rendering of the on-disk struct fields to resemble that of
the old SGI book, with bold field names on one line and the
description indented below. This is a lot more readable than letting
the whole field and description run together as one long line.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Mon, 4 Jan 2016 23:28:55 +0000 (10:28 +1100)]
update book subtitles and headings
The current subtitle is redundant and since this is the third edition
(the second ed. came out in 2006) we might as well note that. Update
some of the headings to make it clear that we're talking about disk
format and not much else.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Mon, 4 Jan 2016 23:28:38 +0000 (10:28 +1100)]
fix asciidoc confusion w.r.t. include file newline at EOF
Space each include one line apart so that asciidoc knows that each
section has ended at included file's EOF. This prevents it from
spewing horribly confused XML that blows up xmllint if each included
file doesn't itself end with a blank line.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Dave Chinner [Mon, 16 Mar 2015 05:16:09 +0000 (16:16 +1100)]
SMR: Updates from LSFMM/Vault
After a week of tallking about SMR and thinking about the issues
raised in the original document and some of the solutions that
have arisen from LSFMM and Vault, there are some updates that need
to be made.
- outer zone is "conventional media recording" (CMR)
- some drives have much more CMR than others
- SMR architecture is targetted at single drives: no RAID!
- SMR architecture is targetted at unparitioned drives: fs only!
- CMR region is large enough for journal
- clarified the hint to vendors for "hybrid" SMR drives
- implications of 256MB zones made clear
- /.zones/ needs to be heirarchical
- zone groups are required for management of locality
- zone inodes and bitmaps need to be reclaimable
- Cleaner updated for zone group awareness
- Inode data fork reverse mapping btree architecture added
- potential concurrent allocation/write issue solution added
This is pulled in from the xml format documents that are present in
git://git.kernel.org/pub/scm/fs/xfs/xfsdocs-xml-dev.git. They are
converted to asciidoc format and a makefile infrastructure is built
around the newly imported design documentation.
Dave Chinner [Tue, 4 Feb 2014 06:20:37 +0000 (17:20 +1100)]
doc: use a2x to build targets
Use the a2x toolchain wrapper to convert the asciidoc via docbook
formats. This allows for asciidoc book format output, automatci
generation of table of contents and a whole raft of documentation
target formats.
Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Dave Chinner [Tue, 4 Feb 2014 06:20:25 +0000 (17:20 +1100)]
XFS design documentation
All technical documentation relating to the design and architecture
of the XFS filesystem will end up in the design/ directory. As a
first step, bring the delayed logging design documentation in the
kernel directory over and convert it to asciidoc format.
This gives us a build target to start adding makefile infrastructure
around to build the documentations. Initially, just start with
generating PDF format documentation.
Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>