<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/xfs/xfs_rtalloc.c, branch linux-4.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-11-05T10:08:39Z</updated>
<entry>
<title>xfs: fix realtime bitmap/summary file truncation when growing rt volume</title>
<updated>2020-11-05T10:08:39Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2020-10-07T20:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bda64b43564ac3eca39202db4f1462487ca4a6bf'/>
<id>urn:sha1:bda64b43564ac3eca39202db4f1462487ca4a6bf</id>
<content type='text'>
[ Upstream commit f4c32e87de7d66074d5612567c5eac7325024428 ]

The realtime bitmap and summary files are regular files that are hidden
away from the directory tree.  Since they're regular files, inode
inactivation will try to purge what it thinks are speculative
preallocations beyond the incore size of the file.  Unfortunately,
xfs_growfs_rt forgets to update the incore size when it resizes the
inodes, with the result that inactivating the rt inodes at unmount time
will cause their contents to be truncated.

Fix this by updating the incore size when we change the ondisk size as
part of updating the superblock.  Note that we don't do this when we're
allocating blocks to the rt inodes because we actually want those blocks
to get purged if the growfs fails.

This fixes corruption complaints from the online rtsummary checker when
running xfs/233.  Since that test requires rmap, one can also trigger
this by growing an rt volume, cycling the mount, and creating rt files.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Chandan Babu R &lt;chandanrlinux@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>xfs: make sure the rt allocator doesn't run off the end</title>
<updated>2020-10-30T09:38:30Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2020-09-09T21:21:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e004f8f381e383a32b4df0eec60cc9813864cd92'/>
<id>urn:sha1:e004f8f381e383a32b4df0eec60cc9813864cd92</id>
<content type='text'>
[ Upstream commit 2a6ca4baed620303d414934aa1b7b0a8e7bab05f ]

There's an overflow bug in the realtime allocator.  If the rt volume is
large enough to handle a single allocation request that is larger than
the maximum bmap extent length and the rt bitmap ends exactly on a
bitmap block boundary, it's possible that the near allocator will try to
check the freeness of a range that extends past the end of the bitmap.
This fails with a corruption error and shuts down the fs.

Therefore, constrain maxlen so that the range scan cannot run off the
end of the rt bitmap.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>xfs: require both realtime inodes to mount</title>
<updated>2019-12-05T08:20:08Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2018-12-12T23:18:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f99d478ddbd8293e6fe499b5906c8c7cfa79141'/>
<id>urn:sha1:2f99d478ddbd8293e6fe499b5906c8c7cfa79141</id>
<content type='text'>
[ Upstream commit 64bafd2f1e484e27071e7584642005d56516cb77 ]

Since mkfs always formats the filesystem with the realtime bitmap and
summary inodes immediately after the root directory, we should expect
that both of them are present and loadable, even if there isn't a
realtime volume attached.  There's no reason to skip this if rbmino ==
NULLFSINO; in fact, this causes an immediate crash if the there /is/ a
realtime volume and someone writes to it.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Bill O'Donnell &lt;billodo@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>xfs: clean up IRELE/iput callsites</title>
<updated>2018-07-26T17:15:16Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2018-07-25T19:52:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=44a8736bd20a08e1adbf479d11f8198a1243958d'/>
<id>urn:sha1:44a8736bd20a08e1adbf479d11f8198a1243958d</id>
<content type='text'>
Replace the IRELE macro with a proper function so that we can do proper
typechecking and so that we can stop open-coding iput in scrub, which
means that we'll be able to ftrace inode lifetimes going through scrub
correctly.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Carlos Maiolino &lt;cmaiolino@redhat.com&gt;
Reviewed-by: Brian Foster &lt;bfoster@redhat.com&gt;
</content>
</entry>
<entry>
<title>xfs: remove all boilerplate defer init/finish code</title>
<updated>2018-07-26T17:15:15Z</updated>
<author>
<name>Brian Foster</name>
</author>
<published>2018-07-24T20:43:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c8eac49ef798a7d00240847f63902caa1388241a'/>
<id>urn:sha1:c8eac49ef798a7d00240847f63902caa1388241a</id>
<content type='text'>
At this point, the transaction subsystem completely manages deferred
items internally such that the common and boilerplate
xfs_trans_alloc() -&gt; xfs_defer_init() -&gt; xfs_defer_finish() -&gt;
xfs_trans_commit() sequence can be replaced with a simple
transaction allocation and commit.

Remove all such boilerplate deferred ops code. In doing so, we
change each case over to use the dfops in the transaction and
specifically eliminate:

- The on-stack dfops and associated xfs_defer_init() call, as the
  internal dfops is initialized on transaction allocation.
- xfs_bmap_finish() calls that precede a final xfs_trans_commit() of
  a transaction.
- xfs_defer_cancel() calls in error handlers that precede a
  transaction cancel.

The only deferred ops calls that remain are those that are
non-deterministic with respect to the final commit of the associated
transaction or are open-coded due to special handling.

Signed-off-by: Brian Foster &lt;bfoster@redhat.com&gt;
Reviewed-by: Bill O'Donnell &lt;billodo@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
</content>
</entry>
<entry>
<title>xfs: remove xfs_defer_init() firstblock param</title>
<updated>2018-07-12T05:26:33Z</updated>
<author>
<name>Brian Foster</name>
</author>
<published>2018-07-12T05:26:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5fdd97944ee5ae0fcdd88227224d0c2c87aa6db9'/>
<id>urn:sha1:5fdd97944ee5ae0fcdd88227224d0c2c87aa6db9</id>
<content type='text'>
All but one caller of xfs_defer_init() passes in the -&gt;t_firstblock
of the associated transaction. The one outlier is
xlog_recover_process_intents(), which simply passes a dummy value
because a valid pointer is required. This firstblock variable can
simply be removed.

At this point we could remove the xfs_defer_init() firstblock
parameter and initialize -&gt;t_firstblock directly. Even that is not
necessary, however, because -&gt;t_firstblock is automatically
reinitialized in the new transaction on a transaction roll. Since
xfs_defer_init() should never occur more than once on a particular
transaction (since the corresponding finish will roll it), replace
the reinit from xfs_defer_init() with an assert that verifies the
transaction has a NULLFSBLOCK firstblock.

Signed-off-by: Brian Foster &lt;bfoster@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
</content>
</entry>
<entry>
<title>xfs: remove xfs_bmapi_write() firstblock param</title>
<updated>2018-07-12T05:26:25Z</updated>
<author>
<name>Brian Foster</name>
</author>
<published>2018-07-12T05:26:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7beabeae221db2118a51f6948239d63b84499ca'/>
<id>urn:sha1:a7beabeae221db2118a51f6948239d63b84499ca</id>
<content type='text'>
All callers pass -&gt;t_firstblock from the current transaction.

Signed-off-by: Brian Foster &lt;bfoster@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
</content>
</entry>
<entry>
<title>xfs: use -&gt;t_firstblock for all xfs_bmapi_write() callers</title>
<updated>2018-07-12T05:26:23Z</updated>
<author>
<name>Brian Foster</name>
</author>
<published>2018-07-12T05:26:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=650919f13182e8deeeeaeb580570afb0cdf8bd0d'/>
<id>urn:sha1:650919f13182e8deeeeaeb580570afb0cdf8bd0d</id>
<content type='text'>
Convert all xfs_bmapi_write() users to -&gt;t_firstblock.

Signed-off-by: Brian Foster &lt;bfoster@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
</content>
</entry>
<entry>
<title>xfs: refactor dfops init to attach to transaction</title>
<updated>2018-07-12T05:26:19Z</updated>
<author>
<name>Brian Foster</name>
</author>
<published>2018-07-12T05:26:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bcd2c9f33559764e0d306e226a8aa88bc2e1e6fb'/>
<id>urn:sha1:bcd2c9f33559764e0d306e226a8aa88bc2e1e6fb</id>
<content type='text'>
Most callers of xfs_defer_init() immediately attach the dfops
structure to a transaction. Add a transaction parameter to eliminate
much of this boilerplate code. This also helps self-document the
fact that many codepaths now expect a dfops pointer implicitly via
xfs_trans-&gt;t_dfops.

Signed-off-by: Brian Foster &lt;bfoster@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
</content>
</entry>
<entry>
<title>xfs: remove xfs_bmapi_write() dfops param</title>
<updated>2018-07-12T05:26:12Z</updated>
<author>
<name>Brian Foster</name>
</author>
<published>2018-07-12T05:26:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e702a5dcbe1d38cf479931dd2e2a3da884143f0'/>
<id>urn:sha1:6e702a5dcbe1d38cf479931dd2e2a3da884143f0</id>
<content type='text'>
Now that all callers use -&gt;t_dfops, the xfs_bmapi_write() dfops
parameter is no longer necessary. Remove it and access -&gt;t_dfops
directly. This patch does not change behavior.

Signed-off-by: Brian Foster &lt;bfoster@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
</content>
</entry>
</feed>
