<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/xfs/xfs_rtalloc.h, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-08-19T01:46:01Z</updated>
<entry>
<title>xfs: make the record pointer passed to query_range functions const</title>
<updated>2021-08-19T01:46:01Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2021-08-11T00:02:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=159eb69dba8baf6d5b58b69936920fb311324c82'/>
<id>urn:sha1:159eb69dba8baf6d5b58b69936920fb311324c82</id>
<content type='text'>
The query_range functions are supposed to call a caller-supplied
function on each record found in the dataset.  These functions don't
own the memory storing the record, so don't let them change the record.

Signed-off-by: Darrick J. Wong &lt;djwong@kernel.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>xfs: make xfs_rtalloc_query_range input parameters const</title>
<updated>2021-08-19T01:46:00Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2021-08-11T00:00:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c02f6529864a4f5f91d216d324bac4ba75415d19'/>
<id>urn:sha1:c02f6529864a4f5f91d216d324bac4ba75415d19</id>
<content type='text'>
In commit 8ad560d2565e, we changed xfs_rtalloc_query_range to constrain
the range of bits in the realtime bitmap file that would actually be
searched.  In commit a3a374bf1889, we changed the range again
(incorrectly), leading to the fix in commit d88850bd5516, which finally
corrected the range check code.  Unfortunately, the author never noticed
that the function modifies its input parameters, which is a totaly no-no
since none of the other range query functions change their input
parameters.

So, fix this function yet again to stash the upper end of the query
range (i.e. the high key) in a local variable and hope this is the last
time I have to fix my own function.  While we're at it, mark the key
inputs const so nobody makes this mistake again. :(

Fixes: 8ad560d2565e ("xfs: strengthen rtalloc query range checks")
Not-fixed-by: a3a374bf1889 ("xfs: fix off-by-one error in xfs_rtalloc_query_range")
Not-fixed-by: d88850bd5516 ("xfs: fix high key handling in the rt allocator's query_range function")
Signed-off-by: Darrick J. Wong &lt;djwong@kernel.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Chandan Babu R &lt;chandanrlinux@gmail.com&gt;
</content>
</entry>
<entry>
<title>xfs: remove xfs_buf_t typedef</title>
<updated>2020-12-17T00:07:34Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2020-12-17T00:07:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e82226138b20d4f638426413e83c6b5db532c6a2'/>
<id>urn:sha1:e82226138b20d4f638426413e83c6b5db532c6a2</id>
<content type='text'>
Prepare for kernel xfs_buf  alignment by getting rid of the
xfs_buf_t typedef from userspace.

[darrick: This patch is a port of a userspace patch removing the
xfs_buf_t typedef in preparation to make the userspace xfs_buf code
behave more like its kernel counterpart.]

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;
Reviewed-by: Dave Chinner &lt;dchinner@redhat.com&gt;
</content>
</entry>
<entry>
<title>xfs: convert to SPDX license tags</title>
<updated>2018-06-06T21:17:53Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2018-06-06T02:42:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b61f8a4079d904b1b1d47946cca898313de8c26'/>
<id>urn:sha1:0b61f8a4079d904b1b1d47946cca898313de8c26</id>
<content type='text'>
Remove the verbose license text from XFS files and replace them
with SPDX tags. This does not change the license of any of the code,
merely refers to the common, up-to-date license files in LICENSES/

This change was mostly scripted. fs/xfs/Makefile and
fs/xfs/libxfs/xfs_fs.h were modified by hand, the rest were detected
and modified by the following command:

for f in `git grep -l "GNU General" fs/xfs/` ; do
	echo $f
	cat $f | awk -f hdr.awk &gt; $f.new
	mv -f $f.new $f
done

And the hdr.awk script that did the modification (including
detecting the difference between GPL-2.0 and GPL-2.0+ licenses)
is as follows:

$ cat hdr.awk
BEGIN {
	hdr = 1.0
	tag = "GPL-2.0"
	str = ""
}

/^ \* This program is free software/ {
	hdr = 2.0;
	next
}

/any later version./ {
	tag = "GPL-2.0+"
	next
}

/^ \*\// {
	if (hdr &gt; 0.0) {
		print "// SPDX-License-Identifier: " tag
		print str
		print $0
		str=""
		hdr = 0.0
		next
	}
	print $0
	next
}

/^ \* / {
	if (hdr &gt; 1.0)
		next
	if (hdr &gt; 0.0) {
		if (str != "")
			str = str "\n"
		str = str $0
		next
	}
	print $0
	next
}

/^ \*/ {
	if (hdr &gt; 0.0)
		next
	print $0
	next
}

// {
	if (hdr &gt; 0.0) {
		if (str != "")
			str = str "\n"
		str = str $0
		next
	}
	print $0
}

END { }
$

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: fix xfs_rtalloc_rec units</title>
<updated>2018-06-01T16:00:16Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2018-05-31T16:12:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a0e5c435babd8bb61612d2e4e9b098cacdd825f7'/>
<id>urn:sha1:a0e5c435babd8bb61612d2e4e9b098cacdd825f7</id>
<content type='text'>
All the realtime allocation functions deal with space on the rtdev in
units of realtime extents.  However, struct xfs_rtalloc_rec confusingly
uses the word 'block' in the name, even though they're really extents.

Fix the naming problem and fix all the unit handling problems in the two
existing users.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Allison Henderson &lt;allison.henderson@oracle.com&gt;
Reviewed-by: Bill O'Donnell &lt;billodo@redhat.com&gt;
</content>
</entry>
<entry>
<title>xfs: cross-reference the realtime bitmap</title>
<updated>2018-01-18T05:00:46Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2018-01-17T02:53:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=46d9bfb5e706493777b9dfed666cd8967f69e6fd'/>
<id>urn:sha1:46d9bfb5e706493777b9dfed666cd8967f69e6fd</id>
<content type='text'>
While we're scrubbing various btrees, cross-reference the records
with the other metadata.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Dave Chinner &lt;dchinner@redhat.com&gt;
</content>
</entry>
<entry>
<title>xfs: create block pointer check functions</title>
<updated>2017-10-26T22:38:23Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2017-10-18T04:37:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=21ec54168b368f1a98097dee00625ec8ec2d47f3'/>
<id>urn:sha1:21ec54168b368f1a98097dee00625ec8ec2d47f3</id>
<content type='text'>
Create some helper functions to check that a block pointer points
within the filesystem (or AG) and doesn't point at static metadata.
We will use this for scrub.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reviewed-by: Dave Chinner &lt;dchinner@redhat.com&gt;
</content>
</entry>
<entry>
<title>xfs: export various function for the online scrubber</title>
<updated>2017-06-19T21:11:34Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2017-06-16T18:00:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2678809799e6e37db0800725157f5ebfc03a9df7'/>
<id>urn:sha1:2678809799e6e37db0800725157f5ebfc03a9df7</id>
<content type='text'>
Export various internal functions so that the online scrubber can use
them to check the state of metadata.

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: add a couple of queries to iterate free extents in the rtbitmap</title>
<updated>2017-04-03T22:18:17Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2017-03-28T21:56:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb3c3de2f65c007f3ee50538ea131f5c4603c7bc'/>
<id>urn:sha1:fb3c3de2f65c007f3ee50538ea131f5c4603c7bc</id>
<content type='text'>
Add _query_range and _query_all functions to the realtime bitmap
allocator.  These two functions are similar in usage to the btree
functions with the same name and will be used for getfsmap and scrub.

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: simplify xfs_rtallocate_extent</title>
<updated>2017-02-18T00:52:52Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2017-02-17T16:21:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=089ec2f87578b9740f0c27bcea9cc6be59c1ddb0'/>
<id>urn:sha1:089ec2f87578b9740f0c27bcea9cc6be59c1ddb0</id>
<content type='text'>
We can deduce the allocation type from the bno argument, and do the
return without prod much simpler internally.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
[darrick: fix the macro for the non-rt build]
Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
</content>
</entry>
</feed>
