<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/xfs/xfs_alloc.c, branch linux-3.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.11.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.11.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-05-20T18:09:11Z</updated>
<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>
<entry>
<title>xfs: don't zero structure members after a memset(0)</title>
<updated>2013-01-03T22:00:07Z</updated>
<author>
<name>Eric Sandeen</name>
</author>
<published>2012-12-10T20:49:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=83a9ba00573904953c58565226f1d3bab9f10983'/>
<id>urn:sha1:83a9ba00573904953c58565226f1d3bab9f10983</id>
<content type='text'>
Commit 408cc4e97a3ccd172d2d676e4b585badf439271b
added memset(0, ...) to allocation args structures,
so there is no need to explicitly set any of the fields
to 0 after that.

Signed-off-by: Eric Sandeen &lt;sandeen@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: convert buffer verifiers to an ops structure.</title>
<updated>2012-11-16T03:35:12Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2012-11-14T06:54:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1813dd64057490e7a0678a885c4fe6d02f78bdc1'/>
<id>urn:sha1:1813dd64057490e7a0678a885c4fe6d02f78bdc1</id>
<content type='text'>
To separate the verifiers from iodone functions and associate read
and write verifiers at the same time, introduce a buffer verifier
operations structure to the xfs_buf.

This avoids the need for assigning the write verifier, clearing the
iodone function and re-running ioend processing in the read
verifier, and gets rid of the nasty "b_pre_io" name for the write
verifier function pointer. If we ever need to, it will also be
easier to add further content specific callbacks to a buffer with an
ops structure in place.

We also avoid needing to export verifier functions, instead we
can simply export the ops structures for those that are needed
outside the function they are defined in.

This patch also fixes a directory block readahead verifier issue
it exposed.

This patch also adds ops callbacks to the inode/alloc btree blocks
initialised by growfs. These will need more work before they will
work with CRCs.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Phil White &lt;pwhite@sgi.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;
</content>
</entry>
<entry>
<title>xfs: connect up write verifiers to new buffers</title>
<updated>2012-11-16T03:35:09Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2012-11-14T06:53:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b0f539de9fcc543a3ffa40bc22bf51aca6ea6183'/>
<id>urn:sha1:b0f539de9fcc543a3ffa40bc22bf51aca6ea6183</id>
<content type='text'>
Metadata buffers that are read from disk have write verifiers
already attached to them, but newly allocated buffers do not. Add
appropriate write verifiers to all new metadata buffers.

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 pre-write metadata buffer verifier callbacks</title>
<updated>2012-11-16T03:35:02Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2012-11-14T06:52:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=612cfbfe174a89d565363fff7f3961a2dda5fb71'/>
<id>urn:sha1:612cfbfe174a89d565363fff7f3961a2dda5fb71</id>
<content type='text'>
These verifiers are essentially the same code as the read verifiers,
but do not require ioend processing. Hence factor the read verifier
functions and add a new write verifier wrapper that is used as the
callback.

This is done as one large patch for all verifiers rather than one
patch per verifier as the change is largely mechanical. This
includes hooking up the write verifier via the read verifier
function.

Hooking up the write verifier for buffers obtained via
xfs_trans_get_buf() will be done in a separate patch as that touches
code in many different places rather than just the verifier
functions.

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: verify AGFL blocks as they are read from disk</title>
<updated>2012-11-16T03:34:14Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2012-11-12T11:54:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bb80c6d79a3b0f9b6c3236a4bec021c72615bfd1'/>
<id>urn:sha1:bb80c6d79a3b0f9b6c3236a4bec021c72615bfd1</id>
<content type='text'>
Add an AGFL block verify callback function and pass it into the
buffer read functions.

While this commit adds verification code to the AGFL, it cannot be
used reliably until the CRC format change comes along as mkfs does
not initialise the full AGFL. Hence it can be full of garbage at the
first mount and will fail verification right now. CRC enabled
filesystems won't have this problem, so leave the code that has
already been written ifdef'd out until the proper time.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Phil White &lt;pwhite@sgi.com&gt;
Signed-off-by: Ben Myers &lt;bpm@sgi.com&gt;
</content>
</entry>
</feed>
