<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/xfs/libxfs, branch linux-4.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-07-24T18:34:52Z</updated>
<entry>
<title>xfs: properly handle free inodes in extent hint validators</title>
<updated>2018-07-24T18:34:52Z</updated>
<author>
<name>Eric Sandeen</name>
</author>
<published>2018-07-24T18:34:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d4a34e16555708bab5b67e679a95f055d8ef9882'/>
<id>urn:sha1:d4a34e16555708bab5b67e679a95f055d8ef9882</id>
<content type='text'>
When inodes are freed in xfs_ifree(), di_flags is cleared (so extent size
hints are removed) but the actual extent size fields are left intact.
This causes the extent hint validators to fail on freed inodes which once
had extent size hints.

This can be observed (for example) by running xfs/229 twice on a
non-crc xfs filesystem, or presumably on V5 with ikeep.

Fixes: 7d71a67 ("xfs: verify extent size hint is valid in inode verifier")
Fixes: 02a0fda ("xfs: verify COW extent size hint is valid in inode verifier")
Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Reviewed-by: Brian Foster &lt;bfoster@redhat.com&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: Initialize variables in xfs_alloc_get_rec before using them</title>
<updated>2018-06-28T13:56:23Z</updated>
<author>
<name>Carlos Maiolino</name>
</author>
<published>2018-06-28T13:56:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9991274fddb9fd4413cb166763cf7368f5086419'/>
<id>urn:sha1:9991274fddb9fd4413cb166763cf7368f5086419</id>
<content type='text'>
Make sure we initialize *bno and *len, before jumping to out_bad_rec
label, and risk calling xfs_warn() with uninitialized variables.

Coverity: 100898
Coverity: 1437081
Coverity: 1437129
Coverity: 1437191
Coverity: 1437201
Coverity: 1437212
Coverity: 1437341
Signed-off-by: Carlos Maiolino &lt;cmaiolino@redhat.com&gt;
Reviewed-by: Brian Foster &lt;bfoster@redhat.com&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: fix fdblocks accounting w/ RMAPBT per-AG reservation</title>
<updated>2018-06-24T19:00:12Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2018-06-22T06:26:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d8cb5e42378918e00eda58792f3ab86dd1e7d214'/>
<id>urn:sha1:d8cb5e42378918e00eda58792f3ab86dd1e7d214</id>
<content type='text'>
In __xfs_ag_resv_init we incorrectly calculate the amount by which to
decrease fdblocks when reserving blocks for the rmapbt.  Because rmapbt
allocations do not decrease fdblocks, we must decrease fdblocks by the
entire size of the requested reservation in order to achieve our goal of
always having enough free blocks to satisfy an rmapbt expansion.

This is in contrast to the refcountbt/finobt, which /do/ subtract from
fdblocks whenever they allocate a block.  For this allocation type we
preserve the existing behavior where we decrease fdblocks only by the
requested reservation minus the size of the existing tree.

This fixes the problem where the available block counts reported by
statfs change across a remount if there had been an rmapbt size change
since mount time.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Allison Henderson &lt;allison.henderson@oracle.com&gt;
</content>
</entry>
<entry>
<title>xfs: fix off-by-one error in xfs_rtalloc_query_range</title>
<updated>2018-06-24T18:56:36Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2018-06-22T06:26:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3a374bf1889b1b401b25e6aada3ca4151a99d15'/>
<id>urn:sha1:a3a374bf1889b1b401b25e6aada3ca4151a99d15</id>
<content type='text'>
In commit 8ad560d2565e6 ("xfs: strengthen rtalloc query range checks")
we strengthened the input parameter checks in the rtbitmap range query
function, but introduced an off-by-one error in the process.  The call
to xfs_rtfind_forw deals with the high key being rextents, but we clamp
the high key to rextents - 1.  This causes the returned results to stop
one block short of the end of the rtdev, which is incorrect.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Allison Henderson &lt;allison.henderson@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>xfs: don't allow insert-range to shift extents past the maximum offset</title>
<updated>2018-06-24T18:56:36Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2018-06-22T06:26:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f62cb48e43195f66c7a40bbfcf11531fc1ff8999'/>
<id>urn:sha1:f62cb48e43195f66c7a40bbfcf11531fc1ff8999</id>
<content type='text'>
Zorro Lang reports that generic/485 blows an assert on a filesystem with
512 byte blocks.  The test tries to fallocate a post-eof extent at the
maximum file size and calls insert range to shift the extents right by
two blocks.  On a 512b block filesystem this causes startoff to overflow
the 54-bit startoff field, leading to the assert.

Therefore, always check the rightmost extent to see if it would overflow
prior to invoking the insert range machinery.

Reported-by: zlang@redhat.com
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200137
Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Allison Henderson &lt;allison.henderson@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>xfs: More robust inode extent count validation</title>
<updated>2018-06-22T06:25:57Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2018-06-22T06:25:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=23fcb3340d033d9f081e21e6c12c2db7eaa541d3'/>
<id>urn:sha1:23fcb3340d033d9f081e21e6c12c2db7eaa541d3</id>
<content type='text'>
When the inode is in extent format, it can't have more extents that
fit in the inode fork. We don't currenty check this, and so this
corruption goes unnoticed by the inode verifiers. This can lead to
crashes operating on invalid in-memory structures.

Attempts to access such a inode will now error out in the verifier
rather than allowing modification operations to proceed.

Reported-by: Wen Xu &lt;wen.xu@gatech.edu&gt;
Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
[darrick: fix a typedef, add some braces and breaks to shut up compiler warnings]
Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
</content>
</entry>
<entry>
<title>xfs: update incore per-AG inode count</title>
<updated>2018-06-12T04:53:52Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2018-06-12T04:52:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=89e9b5c0915aaeaf673a14e794c559768eda5534'/>
<id>urn:sha1:89e9b5c0915aaeaf673a14e794c559768eda5534</id>
<content type='text'>
For whatever reason we never actually update pagi_count (the in-core
perag inode count) when we allocate or free inode chunks.  Online scrub
is going to use it, so we need to fix the accounting.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Brian Foster &lt;bfoster@redhat.com&gt;
</content>
</entry>
<entry>
<title>xfs: replace do_mod with native operations</title>
<updated>2018-06-08T17:07:52Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2018-06-08T16:54:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0703a8e1c17e2cba742eafe640be3b60f77352c4'/>
<id>urn:sha1:0703a8e1c17e2cba742eafe640be3b60f77352c4</id>
<content type='text'>
do_mod() is a hold-over from when we have different sizes for file
offsets and and other internal values for 40 bit XFS filesystems.
Hence depending on build flags variables passed to do_mod() could
change size. We no longer support those small format filesystems and
hence everything is of fixed size theses days, even on 32 bit
platforms.

As such, we can convert all the do_mod() callers to platform
optimised modulus operations as defined by linux/math64.h.
Individual conversions depend on the types of variables being used.

Signed-Off-By: Dave Chinner &lt;dchinner@redhat.com&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: don't call xfs_da_shrink_inode with NULL bp</title>
<updated>2018-06-08T17:07:52Z</updated>
<author>
<name>Eric Sandeen</name>
</author>
<published>2018-06-08T16:53:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a'/>
<id>urn:sha1:bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a</id>
<content type='text'>
xfs_attr3_leaf_create may have errored out before instantiating a buffer,
for example if the blkno is out of range.  In that case there is no work
to do to remove it, and in fact xfs_da_shrink_inode will lead to an oops
if we try.

This also seems to fix a flaw where the original error from
xfs_attr3_leaf_create gets overwritten in the cleanup case, and it
removes a pointless assignment to bp which isn't used after this.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199969
Reported-by: Xu, Wen &lt;wen.xu@gatech.edu&gt;
Tested-by: Xu, Wen &lt;wen.xu@gatech.edu&gt;
Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&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: clean up MIN/MAX</title>
<updated>2018-06-08T17:07:52Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2018-06-07T14:54:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9bb54cb56ae8498d35392745f8f050112cec5dcb'/>
<id>urn:sha1:9bb54cb56ae8498d35392745f8f050112cec5dcb</id>
<content type='text'>
Get rid of the MIN/MAX macros and just use the native min/max macros
directly in the XFS code.

Signed-Off-By: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-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>
