<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/xfs/xfs_rtalloc.c, branch linux-6.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-07-10T14:08:24Z</updated>
<entry>
<title>xfs: actually use the xfs_growfs_check_rtgeom tracepoint</title>
<updated>2025-07-10T14:08:24Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2025-06-12T17:51:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=955c2707e392bb06c259ba70a2178c0c3f449f4d'/>
<id>urn:sha1:955c2707e392bb06c259ba70a2178c0c3f449f4d</id>
<content type='text'>
commit db44d088a5ab030b741a3adf2e7b181a8a6dcfbe upstream.

We created a new tracepoint but forgot to put it in.  Fix that.

Cc: rostedt@goodmis.org
Cc: stable@vger.kernel.org # v6.14
Fixes: 59a57acbce282d ("xfs: check that the rtrmapbt maxlevels doesn't increase when growing fs")
Signed-off-by: Darrick J. Wong &lt;djwong@kernel.org&gt;
Reviewed-by: Carlos Maiolino &lt;cmaiolino@redhat.com&gt;
Reported-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Closes: https://lore.kernel.org/all/20250612131021.114e6ec8@batman.local.home/
Signed-off-by: Carlos Maiolino &lt;cem@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>xfs: remove the flags argument to xfs_buf_get_uncached</title>
<updated>2025-03-18T13:47:45Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2025-03-17T05:48:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b3f8f2903b8cd48b0746bf05a40b85ae4b684034'/>
<id>urn:sha1:b3f8f2903b8cd48b0746bf05a40b85ae4b684034</id>
<content type='text'>
No callers passes flags to xfs_buf_get_uncached, which makes sense
given that the flags apply to behavior not used for uncached buffers.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Carlos Maiolino &lt;cmaiolino@redhat.com&gt;
Signed-off-by: Carlos Maiolino &lt;cem@kernel.org&gt;
</content>
</entry>
<entry>
<title>xfs: remove the flags argument to xfs_buf_read_uncached</title>
<updated>2025-03-18T13:47:45Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2025-03-17T05:48:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d54b48fef677ea35084773308148af723ed7b64'/>
<id>urn:sha1:8d54b48fef677ea35084773308148af723ed7b64</id>
<content type='text'>
No callers passes flags to xfs_buf_read_uncached, which makes sense
given that the flags apply to behavior not used for uncached buffers.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Carlos Maiolino &lt;cmaiolino@redhat.com&gt;
Signed-off-by: Carlos Maiolino &lt;cem@kernel.org&gt;
</content>
</entry>
<entry>
<title>xfs: remove unnecessary NULL check before kvfree()</title>
<updated>2025-03-18T13:24:13Z</updated>
<author>
<name>Chen Ni</name>
</author>
<published>2025-03-13T03:28:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34ba1fcd74562b5a954e3fda5a303ab412682340'/>
<id>urn:sha1:34ba1fcd74562b5a954e3fda5a303ab412682340</id>
<content type='text'>
Remove unnecessary NULL check before kvfree() reported by
Coccinelle/coccicheck and the semantic patch at
scripts/coccinelle/free/ifnullfree.cocci.

Signed-off-by: Chen Ni &lt;nichen@iscas.ac.cn&gt;
Reviewed-by: Carlos Maiolino &lt;cmaiolino@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Carlos Maiolino &lt;cem@kernel.org&gt;
</content>
</entry>
<entry>
<title>xfs: support growfs on zoned file systems</title>
<updated>2025-03-03T15:17:08Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2024-11-17T09:27:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=01b71e64bb875b329e5b04715d96a477b86ba5de'/>
<id>urn:sha1:01b71e64bb875b329e5b04715d96a477b86ba5de</id>
<content type='text'>
Replace the inner loop growing one RT bitmap block at a time with
one just modifying the superblock counters for growing an entire
zone (aka RTG).  The big restriction is just like at mkfs time only
a RT extent size of a single FSB is allowed, and the file system
capacity needs to be aligned to the zone size.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: "Darrick J. Wong" &lt;djwong@kernel.org&gt;
</content>
</entry>
<entry>
<title>xfs: add the zoned space allocator</title>
<updated>2025-03-03T15:16:56Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2025-02-13T04:49:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e4d52075577707f8393e3fc74c1ef79ca1d3ce6'/>
<id>urn:sha1:4e4d52075577707f8393e3fc74c1ef79ca1d3ce6</id>
<content type='text'>
For zoned RT devices space is always allocated at the write pointer, that
is right after the last written block and only recorded on I/O completion.

Because the actual allocation algorithm is very simple and just involves
picking a good zone - preferably the one used for the last write to the
inode.  As the number of zones that can written at the same time is
usually limited by the hardware, selecting a zone is done as late as
possible from the iomap dio and buffered writeback bio submissions
helpers just before submitting the bio.

Given that the writers already took a reservation before acquiring the
iolock, space will always be readily available if an open zone slot is
available.  A new structure is used to track these open zones, and
pointed to by the xfs_rtgroup.  Because zoned file systems don't have
a rsum cache the space for that pointer can be reused.

Allocations are only recorded at I/O completion time.  The scheme used
for that is very similar to the reflink COW end I/O path.

Co-developed-by: Hans Holmberg &lt;hans.holmberg@wdc.com&gt;
Signed-off-by: Hans Holmberg &lt;hans.holmberg@wdc.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: "Darrick J. Wong" &lt;djwong@kernel.org&gt;
</content>
</entry>
<entry>
<title>xfs: allow internal RT devices for zoned mode</title>
<updated>2025-03-03T15:16:45Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2024-11-17T07:53:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bdc03eb5f98f6f1ae4bd5e020d1582a23efb7799'/>
<id>urn:sha1:bdc03eb5f98f6f1ae4bd5e020d1582a23efb7799</id>
<content type='text'>
Allow creating an RT subvolume on the same device as the main data
device.  This is mostly used for SMR HDDs where the conventional zones
are used for the data device and the sequential write required zones
for the zoned RT section.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: "Darrick J. Wong" &lt;djwong@kernel.org&gt;
</content>
</entry>
<entry>
<title>xfs: define the zoned on-disk format</title>
<updated>2025-03-03T15:16:45Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2024-11-30T03:48:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2167eaabe2fadde24cb8f1dafbec64da1d2ed2f5'/>
<id>urn:sha1:2167eaabe2fadde24cb8f1dafbec64da1d2ed2f5</id>
<content type='text'>
Zone file systems reuse the basic RT group enabled XFS file system
structure to support a mode where each RT group is always written from
start to end and then reset for reuse (after moving out any remaining
data).  There are few minor but important changes, which are indicated
by a new incompat flag:

1) there are no bitmap and summary inodes, thus the
   /rtgroups/{rgno}.{bitmap,summary} metadir files do not exist and the
   sb_rbmblocks superblock field must be cleared to zero.

2) there is a new superblock field that specifies the start of an
   internal RT section.  This allows supporting SMR HDDs that have random
   writable space at the beginning which is used for the XFS data device
   (which really is the metadata device for this configuration), directly
   followed by a RT device on the same block device.  While something
   similar could be achieved using dm-linear just having a single device
   directly consumed by XFS makes handling the file systems a lot easier.

3) Another superblock field that tracks the amount of reserved space (or
   overprovisioning) that is never used for user capacity, but allows GC
   to run more smoothly.

4) an overlay of the cowextsize field for the rtrmap inode so that we
   can persistently track the total amount of rtblocks currently used in
   a RT group.  There is no data structure other than the rmap that
   tracks used space in an RT group, and this counter is used to decide
   when a RT group has been entirely emptied, and to select one that
   is relatively empty if garbage collection needs to be performed.
   While this counter could be tracked entirely in memory and rebuilt
   from the rmap at mount time, that would lead to very long mount times
   with the large number of RT groups implied by the number of hardware
   zones especially on SMR hard drives with 256MB zone sizes.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: "Darrick J. Wong" &lt;djwong@kernel.org&gt;
</content>
</entry>
<entry>
<title>xfs: factor out a xfs_rt_check_size helper</title>
<updated>2025-03-03T15:16:44Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2024-07-30T23:42:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a581de0d613aa810c020edc1ea576c75fa5b3950'/>
<id>urn:sha1:a581de0d613aa810c020edc1ea576c75fa5b3950</id>
<content type='text'>
Add a helper to check that the last block of a RT device is readable
to share the code between mount and growfs.  This also adds the mount
time overflow check to growfs and improves the error messages.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: "Darrick J. Wong" &lt;djwong@kernel.org&gt;
</content>
</entry>
<entry>
<title>xfs: make metabtree reservations global</title>
<updated>2025-03-03T15:16:43Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2025-02-15T06:48:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1df8d75030b787a9fae270b59b93eef809dd2011'/>
<id>urn:sha1:1df8d75030b787a9fae270b59b93eef809dd2011</id>
<content type='text'>
Currently each metabtree inode has it's own space reservation to ensure
it can be expanded to the maximum size, mirroring what is done for the
AG-based btrees.  But unlike the AG-based btrees the metabtree inodes
aren't restricted to allocate from a single AG but can use free space
form the entire file system.  And unlike AG-based btrees where the
required reservation shrinks with the available free space due to this,
the metabtree reservations for the rtrmap and rtfreflink trees are not
bound in any way by the data device free space as they track RT extent
allocations.  This is not very efficient as it requires a large number
of blocks to be set aside that can't be used at all by other btrees.

Switch to a model that uses a global pool instead in preparation for
reducing the amount of reserved space, which now also removes the
overloading of the i_nblocks field for metabtree inodes, which would
create problems if metabtree inodes ever had a big enough xattr fork
to require xattr blocks outside the inode.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: "Darrick J. Wong" &lt;djwong@kernel.org&gt;
</content>
</entry>
</feed>
