<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/xfs/xfs_alloc.c, branch linux-3.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-11-06T18:42:52Z</updated>
<entry>
<title>xfs: add tracepoints to AGF/AGI read operations</title>
<updated>2013-11-06T18:42:52Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2013-11-01T04:27:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d123031a5673cd38a85ce66cc07243dfe5f424c9'/>
<id>urn:sha1:d123031a5673cd38a85ce66cc07243dfe5f424c9</id>
<content type='text'>
To help track down AGI/AGF lock ordering issues, I added these
tracepoints to tell us when an AGI or AGF is read and locked.  With
these we can now determine if the lock ordering goes wrong from
tracing captures.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;

</content>
</entry>
<entry>
<title>xfs: decouple inode and bmap btree header files</title>
<updated>2013-10-23T21:28:49Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2013-10-22T23:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a4fbe6ab1e7abecf42b75e9c73701ed33b4ab03b'/>
<id>urn:sha1:a4fbe6ab1e7abecf42b75e9c73701ed33b4ab03b</id>
<content type='text'>
Currently the xfs_inode.h header has a dependency on the definition
of the BMAP btree records as the inode fork includes an array of
xfs_bmbt_rec_host_t objects in it's definition.

Move all the btree format definitions from xfs_btree.h,
xfs_bmap_btree.h, xfs_alloc_btree.h and xfs_ialloc_btree.h to
xfs_format.h to continue the process of centralising the on-disk
format definitions. With this done, the xfs inode definitions are no
longer dependent on btree header files.

The enables a massive culling of unnecessary includes, with close to
200 #include directives removed from the XFS kernel code base.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Ben Myers &lt;bpm@sgi.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;

</content>
</entry>
<entry>
<title>xfs: decouple log and transaction headers</title>
<updated>2013-10-23T21:17:44Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2013-10-22T23:50:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=239880ef6454ccff2ba8d762c3f86e8278f0ce1c'/>
<id>urn:sha1:239880ef6454ccff2ba8d762c3f86e8278f0ce1c</id>
<content type='text'>
xfs_trans.h has a dependency on xfs_log.h for a couple of
structures. Most code that does transactions doesn't need to know
anything about the log, but this dependency means that they have to
include xfs_log.h. Decouple the xfs_trans.h and xfs_log.h header
files and clean up the includes to be in dependency order.

In doing this, remove the direct include of xfs_trans_reserve.h from
xfs_trans.h so that we remove the dependency between xfs_trans.h and
xfs_mount.h. Hence the xfs_trans.h include can be moved to the
indicate the actual dependencies other header files have on it.

Note that these are kernel only header files, so this does not
translate to any userspace changes at all.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Ben Myers &lt;bpm@sgi.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;

</content>
</entry>
<entry>
<title>xfs: create a shared header file for format-related information</title>
<updated>2013-10-23T19:11:30Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2013-10-22T23:36:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=70a9883c5f34b215b8a77665cefd0398edc5a9ef'/>
<id>urn:sha1:70a9883c5f34b215b8a77665cefd0398edc5a9ef</id>
<content type='text'>
All of the buffer operations structures are needed to be exported
for xfs_db, so move them all to a common location rather than
spreading them all over the place. They are verifying the on-disk
format, so while xfs_format.h might be a good place, it is not part
of the on disk format.

Hence we need to create a new header file that we centralise these
related definitions. Start by moving the bffer operations
structures, and then also move all the other definitions that have
crept into xfs_log_format.h and xfs_format.h as there was no other
shared header file to put them in.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;

</content>
</entry>
<entry>
<title>xfs: kill __KERNEL__ check for debug code in allocation code</title>
<updated>2013-08-12T21:57:51Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2013-08-12T10:49:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63d20d6e3620898e67f80c813ec199b19b1674a9'/>
<id>urn:sha1:63d20d6e3620898e67f80c813ec199b19b1674a9</id>
<content type='text'>
Userspace running debug builds is relatively rare, so there's need
to special case the allocation algorithm code coverage debug switch.
As it is, userspace defines random numbers to 0, so  invert the
logic of the switch so it is effectively a no-op in userspace.
This kills another couple of __KERNEL__ users.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Mark Tinguely &lt;tinguely@sgi.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;

</content>
</entry>
<entry>
<title>xfs: Avoid pathological backwards allocation</title>
<updated>2013-05-20T18:09:11Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2013-04-11T20:09:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=211d022c43cac3aecbe967fcaf9b10156bfa63ad'/>
<id>urn:sha1:211d022c43cac3aecbe967fcaf9b10156bfa63ad</id>
<content type='text'>
Writing a large file using direct IO in 16 MB chunks sometimes results
in a pathological allocation pattern where 16 MB chunks of large free
extent are allocated to a file in a reversed order. So extents of a file
look for example as:

 ext logical physical expected length flags
   0        0        13          4550656
   1  4550656 188136807   4550668 12562432
   2 17113088 200699240 200699238 622592
   3 17735680 182046055 201321831   4096
   4 17739776 182041959 182050150   4096
   5 17743872 182037863 182046054   4096
   6 17747968 182033767 182041958   4096
   7 17752064 182029671 182037862   4096
...
6757 45400064 154381644 154389835   4096
6758 45404160 154377548 154385739   4096
6759 45408256 252951571 154381643  73728 eof

This happens because XFS_ALLOCTYPE_THIS_BNO allocation fails (the last
extent in the file cannot be further extended) so we fall back to
XFS_ALLOCTYPE_NEAR_BNO allocation which picks end of a large free
extent as the best place to continue the file. Since the chunk at the
end of the free extent again cannot be further extended, this behavior
repeats until the whole free extent is consumed in a reversed order.

For data allocations this backward allocation isn't beneficial so make
xfs_alloc_compute_diff() pick start of a free extent instead of its end
for them. That avoids the backward allocation pattern.

See thread at http://oss.sgi.com/archives/xfs/2013-03/msg00144.html for
more details about the reproduction case and why this solution was
chosen.

Based on idea by Dave Chinner &lt;dchinner@redhat.com&gt;.

CC: Dave Chinner &lt;dchinner@redhat.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Reviewed-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Mark Tinguely &lt;tinguely@sgi.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;

</content>
</entry>
<entry>
<title>xfs: buffer type overruns blf_flags field</title>
<updated>2013-04-27T18:01:58Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2013-04-03T05:11:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=61fe135c1dde112f483bba01d645debd881b5428'/>
<id>urn:sha1:61fe135c1dde112f483bba01d645debd881b5428</id>
<content type='text'>
The buffer type passed to log recvoery in the buffer log item
overruns the blf_flags field. I had assumed that flags field was a
32 bit value, and it turns out it is a unisgned short. Therefore
having 19 flags doesn't really work.

Convert the buffer type field to numeric value, and use the top 5
bits of the flags field for it. We currently have 17 types of
buffers, so using 5 bits gives us plenty of room for expansion in
future....

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Ben Myers &lt;bpm@sgi.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;

</content>
</entry>
<entry>
<title>xfs: add CRC checks to the AGFL</title>
<updated>2013-04-21T19:55:34Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2013-04-03T05:11:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77c95bba013089fa868217283eb6d98a05913e53'/>
<id>urn:sha1:77c95bba013089fa868217283eb6d98a05913e53</id>
<content type='text'>
Add CRC checks, location information and a magic number to the AGFL.
Previously the AGFL was just a block containing nothing but the
free block pointers.  The new AGFL has a real header with the usual
boilerplate instead, so that we can verify it's not corrupted and
written into the right place.

[dchinner@redhat.com] Added LSN field, reworked significantly to fit
into new verifier structure and growfs structure, enabled full
verifier functionality now there is a header to verify and we can
guarantee an initialised AGFL.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Ben Myers &lt;bpm@sgi.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;

</content>
</entry>
<entry>
<title>xfs: add CRC checks to the AGF</title>
<updated>2013-04-21T19:54:46Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2013-04-03T05:11:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e0e6040c4052aff15a494ac05778f4086d24c33'/>
<id>urn:sha1:4e0e6040c4052aff15a494ac05778f4086d24c33</id>
<content type='text'>
The AGF already has some self identifying fields (e.g. the sequence
number) so we only need to add the uuid to it to identify the
filesystem it belongs to. The location is fixed based on the
sequence number, so there's no need to add a block number, either.

Hence the only additional fields are the CRC and LSN fields. These
are unlogged, so place some space between the end of the logged
fields and them so that future expansion of the AGF for logged
fields can be placed adjacent to the existing logged fields and
hence not complicate the field-derived range based logging we
currently have.

Based originally on a patch from myself, modified further by
Christoph Hellwig and then modified again to fit into the
verifier structure with additional fields by myself. The multiple
signed-off-by tags indicate the age and history of this patch.

Signed-off-by: Dave Chinner &lt;dgc@sgi.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Ben Myers &lt;bpm@sgi.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;

</content>
</entry>
<entry>
<title>xfs: rename random32() to prandom_u32()</title>
<updated>2013-03-07T18:33:57Z</updated>
<author>
<name>Akinobu Mita</name>
</author>
<published>2013-03-04T12:58:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ecb3403de1efb56f78d9093376aec0a8af76b316'/>
<id>urn:sha1:ecb3403de1efb56f78d9093376aec0a8af76b316</id>
<content type='text'>
Use more preferable function name which implies using a pseudo-random
number generator.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Acked-by: &lt;bpm@sgi.com&gt;
Cc: Ben Myers &lt;bpm@sgi.com&gt;
Cc: Alex Elder &lt;elder@kernel.org&gt;
Cc: xfs@oss.sgi.com
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;

</content>
</entry>
</feed>
