<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-op-linux/fs/xfs/libxfs/xfs_alloc.c, branch master</title>
<subtitle>Talos™ II Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/talos-op-linux/atom?h=master</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-op-linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/'/>
<updated>2020-01-26T22:32:26+00:00</updated>
<entry>
<title>xfs: make xfs_*read_agf return EAGAIN to ALLOC_FLAG_TRYLOCK callers</title>
<updated>2020-01-26T22:32:26+00:00</updated>
<author>
<name>Darrick J. Wong</name>
<email>darrick.wong@oracle.com</email>
</author>
<published>2020-01-24T01:01:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=f48e2df8a877ca1c19d92cfd7e74cc5956fa84cb'/>
<id>urn:sha1:f48e2df8a877ca1c19d92cfd7e74cc5956fa84cb</id>
<content type='text'>
Refactor xfs_read_agf and xfs_alloc_read_agf to return EAGAIN if the
caller passed TRYLOCK and we weren't able to get the lock; and change
the callers to recognize this.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Dave Chinner &lt;dchinner@redhat.com&gt;
</content>
</entry>
<entry>
<title>xfs: remove the xfs_btree_get_buf[ls] functions</title>
<updated>2020-01-26T22:32:26+00:00</updated>
<author>
<name>Darrick J. Wong</name>
<email>darrick.wong@oracle.com</email>
</author>
<published>2020-01-24T01:01:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=ee647f85cb81b09bbfa2886954828ed03fa3ec38'/>
<id>urn:sha1:ee647f85cb81b09bbfa2886954828ed03fa3ec38</id>
<content type='text'>
Remove the xfs_btree_get_bufs and xfs_btree_get_bufl functions, since
they're pretty trivial oneliners.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Dave Chinner &lt;dchinner@redhat.com&gt;
</content>
</entry>
<entry>
<title>xfs: make xfs_buf_read_map return an error code</title>
<updated>2020-01-26T22:32:26+00:00</updated>
<author>
<name>Darrick J. Wong</name>
<email>darrick.wong@oracle.com</email>
</author>
<published>2020-01-24T01:01:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=4ed8e27b4f755f50d78dc3d9f9760b60e891f97b'/>
<id>urn:sha1:4ed8e27b4f755f50d78dc3d9f9760b60e891f97b</id>
<content type='text'>
Convert xfs_buf_read_map() to return numeric error codes like most
everywhere else in xfs.  This involves moving the open-coded logic that
reports metadata IO read / corruption errors and stales the buffer into
xfs_buf_read_map so that the logic is all in one place.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Dave Chinner &lt;dchinner@redhat.com&gt;
</content>
</entry>
<entry>
<title>xfs: refactor agfl length computation function</title>
<updated>2019-12-19T15:53:48+00:00</updated>
<author>
<name>Darrick J. Wong</name>
<email>darrick.wong@oracle.com</email>
</author>
<published>2019-12-18T19:09:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=1cac233cfe71f21e069705a4930c18e48d897be6'/>
<id>urn:sha1:1cac233cfe71f21e069705a4930c18e48d897be6</id>
<content type='text'>
Refactor xfs_alloc_min_freelist to accept a NULL @pag argument, in which
case it returns the largest possible minimum length.  This will be used
in an upcoming patch to compute the length of the AGFL at mkfs time.

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: convert open coded corruption check to use XFS_IS_CORRUPT</title>
<updated>2019-11-13T19:08:01+00:00</updated>
<author>
<name>Darrick J. Wong</name>
<email>darrick.wong@oracle.com</email>
</author>
<published>2019-11-11T20:53:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=a71895c5dad1ab8cf30622e208d148298ab602e5'/>
<id>urn:sha1:a71895c5dad1ab8cf30622e208d148298ab602e5</id>
<content type='text'>
Convert the last of the open coded corruption check and report idioms to
use the XFS_IS_CORRUPT macro.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>xfs: kill the XFS_WANT_CORRUPT_* macros</title>
<updated>2019-11-13T01:19:02+00:00</updated>
<author>
<name>Darrick J. Wong</name>
<email>darrick.wong@oracle.com</email>
</author>
<published>2019-11-11T20:52:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=f9e0370648b9f9908ec97f44459a1152aecbbf45'/>
<id>urn:sha1:f9e0370648b9f9908ec97f44459a1152aecbbf45</id>
<content type='text'>
The XFS_WANT_CORRUPT_* macros conceal subtle side effects such as the
creation of local variables and redirections of the code flow.  This is
pretty ugly, so replace them with explicit XFS_IS_CORRUPT tests that
remove both of those ugly points.  The change was performed with the
following coccinelle script:

@@
expression mp, test;
identifier label;
@@

- XFS_WANT_CORRUPTED_GOTO(mp, test, label);
+ if (XFS_IS_CORRUPT(mp, !test)) { error = -EFSCORRUPTED; goto label; }

@@
expression mp, test;
@@

- XFS_WANT_CORRUPTED_RETURN(mp, test);
+ if (XFS_IS_CORRUPT(mp, !test)) return -EFSCORRUPTED;

@@
expression mp, lval, rval;
@@

- XFS_IS_CORRUPT(mp, !(lval == rval))
+ XFS_IS_CORRUPT(mp, lval != rval)

@@
expression mp, e1, e2;
@@

- XFS_IS_CORRUPT(mp, !(e1 &amp;&amp; e2))
+ XFS_IS_CORRUPT(mp, !e1 || !e2)

@@
expression e1, e2;
@@

- !(e1 == e2)
+ e1 != e2

@@
expression e1, e2, e3, e4, e5, e6;
@@

- !(e1 == e2 &amp;&amp; e3 == e4) || e5 != e6
+ e1 != e2 || e3 != e4 || e5 != e6

@@
expression e1, e2, e3, e4, e5, e6;
@@

- !(e1 == e2 || (e3 &lt;= e4 &amp;&amp; e5 &lt;= e6))
+ e1 != e2 &amp;&amp; (e3 &gt; e4 || e5 &gt; e6)

@@
expression mp, e1, e2;
@@

- XFS_IS_CORRUPT(mp, !(e1 &lt;= e2))
+ XFS_IS_CORRUPT(mp, e1 &gt; e2)

@@
expression mp, e1, e2;
@@

- XFS_IS_CORRUPT(mp, !(e1 &lt; e2))
+ XFS_IS_CORRUPT(mp, e1 &gt;= e2)

@@
expression mp, e1;
@@

- XFS_IS_CORRUPT(mp, !!e1)
+ XFS_IS_CORRUPT(mp, e1)

@@
expression mp, e1, e2;
@@

- XFS_IS_CORRUPT(mp, !(e1 || e2))
+ XFS_IS_CORRUPT(mp, !e1 &amp;&amp; !e2)

@@
expression mp, e1, e2, e3, e4;
@@

- XFS_IS_CORRUPT(mp, !(e1 == e2) &amp;&amp; !(e3 == e4))
+ XFS_IS_CORRUPT(mp, e1 != e2 &amp;&amp; e3 != e4)

@@
expression mp, e1, e2, e3, e4;
@@

- XFS_IS_CORRUPT(mp, !(e1 &lt;= e2) || !(e3 &gt;= e4))
+ XFS_IS_CORRUPT(mp, e1 &gt; e2 || e3 &lt; e4)

@@
expression mp, e1, e2, e3, e4;
@@

- XFS_IS_CORRUPT(mp, !(e1 == e2) &amp;&amp; !(e3 &lt;= e4))
+ XFS_IS_CORRUPT(mp, e1 != e2 &amp;&amp; e3 &gt; e4)

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>xfs: clean up weird while loop in xfs_alloc_ag_vextent_near</title>
<updated>2019-11-10T18:21:58+00:00</updated>
<author>
<name>Darrick J. Wong</name>
<email>darrick.wong@oracle.com</email>
</author>
<published>2019-11-07T20:29:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=5113f8ec3753ed4d68a5d54d3345fee33a914bfe'/>
<id>urn:sha1:5113f8ec3753ed4d68a5d54d3345fee33a914bfe</id>
<content type='text'>
Refactor the weird while loop out of existence.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>xfs: Correct comment tyops -&gt; typos</title>
<updated>2019-11-10T18:21:57+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2019-11-07T21:24:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=cf085a1b5d221448c0c7425f3b9b9a9e2134e53e'/>
<id>urn:sha1:cf085a1b5d221448c0c7425f3b9b9a9e2134e53e</id>
<content type='text'>
Just fix the typos checkpatch notices...

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reviewed-by: Bill O'Donnell &lt;billodo@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: always log corruption errors</title>
<updated>2019-11-04T21:55:54+00:00</updated>
<author>
<name>Darrick J. Wong</name>
<email>darrick.wong@oracle.com</email>
</author>
<published>2019-11-02T16:40:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=a5155b870d687de1a5f07e774b49b1e8ef0f6f50'/>
<id>urn:sha1:a5155b870d687de1a5f07e774b49b1e8ef0f6f50</id>
<content type='text'>
Make sure we log something to dmesg whenever we return -EFSCORRUPTED up
the call stack.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Carlos Maiolino &lt;cmaiolino@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>xfs: cleanup use of the XFS_ALLOC_ flags</title>
<updated>2019-11-03T18:22:31+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2019-10-30T19:25:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=c34d570d158699c6c812f5df653aaf2e3a83acca'/>
<id>urn:sha1:c34d570d158699c6c812f5df653aaf2e3a83acca</id>
<content type='text'>
Always set XFS_ALLOC_USERDATA for data fork allocations, and check it
in xfs_alloc_is_userdata instead of the current obsfucated check.
Also remove the xfs_alloc_is_userdata and xfs_alloc_allow_busy_reuse
helpers to make the code a little easier to understand.

Signed-off-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>
