<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/fs/btrfs/backref.c, branch linux-3.5.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-3.5.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-3.5.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2012-06-27T14:34:39+00:00</updated>
<entry>
<title>Btrfs: leave critical region in btrfs_find_all_roots as soon as possible</title>
<updated>2012-06-27T14:34:39+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2012-06-22T12:01:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=155725c9c051a343be5e555bf943da827e6cf721'/>
<id>urn:sha1:155725c9c051a343be5e555bf943da827e6cf721</id>
<content type='text'>
When delayed refs exist, btrfs_find_all_roots used to hold the delayed ref
mutex way longer than actually required. We ought to drop it immediately
after we're done collecting all the delayed refs.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
</entry>
<entry>
<title>Btrfs: support root level changes in __resolve_indirect_ref</title>
<updated>2012-06-27T14:34:38+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2012-06-27T13:23:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9345457f4a539a40056431aeb6f068750857472f'/>
<id>urn:sha1:9345457f4a539a40056431aeb6f068750857472f</id>
<content type='text'>
With the tree mod log, we can have a tree that's two levels high, but
btrfs_search_old_slot may still return a path with the tree root at level
one instead. __resolve_indirect_ref must care for this and accept parents in
a lower level than expected.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
</entry>
<entry>
<title>Btrfs: don't assume to be on the correct extent in add_all_parents</title>
<updated>2012-06-21T11:19:34+00:00</updated>
<author>
<name>Alexander Block</name>
<email>ablock84@googlemail.com</email>
</author>
<published>2012-06-19T13:42:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=69bca40d41c613927b150c5392505f1894fe3010'/>
<id>urn:sha1:69bca40d41c613927b150c5392505f1894fe3010</id>
<content type='text'>
add_all_parents did assume that path is already at a correct extent data
item, which may not be true in case of data extents that were partly
rewritten and splitted.

We need to check if we're on a matching extent for every item and only
for the ones after the first. The loop is changed to do this now.

This patch also fixes a bug introduced with commit 3b127fd8 "Btrfs:
remove obsolete btrfs_next_leaf call from __resolve_indirect_ref".
The removal of next_leaf did sometimes result in slot==nritems when
the above described case happens, and thus resulting in invalid values
(e.g. wanted_obejctid) in add_all_parents (leading to missed backrefs
or even crashes).

Signed-off-by: Alexander Block &lt;ablock84@googlemail.com&gt;
Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: add btrfs_next_old_leaf</title>
<updated>2012-06-14T16:52:09+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2012-06-11T06:29:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3d7806eca43e73a9721d2e09369200ed93036bd0'/>
<id>urn:sha1:3d7806eca43e73a9721d2e09369200ed93036bd0</id>
<content type='text'>
To make sense of the tree mod log, the backref walker not only needs
btrfs_search_old_slot, but it also called btrfs_next_leaf, which in turn was
calling btrfs_search_slot. This obviously didn't give the correct result.

This commit adds btrfs_next_old_leaf, a drop-in replacement for
btrfs_next_leaf with a time_seq parameter. If it is zero, it behaves exactly
like btrfs_next_leaf. If it is non-zero, it will use btrfs_search_old_slot
with this time_seq parameter.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
</entry>
<entry>
<title>Btrfs: remove obsolete btrfs_next_leaf call from __resolve_indirect_ref</title>
<updated>2012-06-14T16:44:20+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2012-06-14T14:10:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f617e2fd52484fb74236a597d0f9068ec7d9d2dd'/>
<id>urn:sha1:f617e2fd52484fb74236a597d0f9068ec7d9d2dd</id>
<content type='text'>
When resolving indirect refs, we used to call btrfs_next_leaf in case we
didn't find an exact match. While we should find exact matches most of the
time, in case we don't, we must continue searching. Treating those matches
differently depending on the level we're searching doesn't make sense.

Even worse, we might end up searching for a key larger than the largest, in
which case there is no next_leaf and subsequent jobs would fail. This commit
drops the bogous lines.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
</entry>
<entry>
<title>Btrfs: add inodes before dropping the extent lock in find_all_leafs</title>
<updated>2012-05-31T17:53:08+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2012-05-30T16:05:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3301958b7c1dae8f0f5ded63aa881e0b71e78464'/>
<id>urn:sha1:3301958b7c1dae8f0f5ded63aa881e0b71e78464</id>
<content type='text'>
We must build up the inode list with the extent lock held after following
indirect refs.

This also requires an extension to ulists, which allows to modify the stored
aux value in case a key already exists in the list.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
</entry>
<entry>
<title>Btrfs: use the tree modification log for backref resolving</title>
<updated>2012-05-30T13:17:34+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2012-05-16T16:36:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8445f61cad927b6efffdd4e042a51a783ff8853f'/>
<id>urn:sha1:8445f61cad927b6efffdd4e042a51a783ff8853f</id>
<content type='text'>
This enables backref resolving on life trees while they are changing. This
is a prerequisite for quota groups and just nice to have for everything
else.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
</entry>
<entry>
<title>Btrfs: look into the extent during find_all_leafs</title>
<updated>2012-05-26T10:17:52+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2012-05-17T14:43:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=976b1908d97bd8cbd024ba7aafaa3fb637ea8e13'/>
<id>urn:sha1:976b1908d97bd8cbd024ba7aafaa3fb637ea8e13</id>
<content type='text'>
Before this patch we called find_all_leafs for a data extent, then called
find_all_roots and then looked into the extent to grab the information
we were seeking. This was done without holding the leaves locked to avoid
deadlocks. However, this can obviouly race with concurrent tree
modifications.

Instead, we now look into the extent while we're holding the lock during
find_all_leafs and store this information together with the leaf list.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
</entry>
<entry>
<title>Btrfs: bugfix: ignore the wrong key for indirect tree block backrefs</title>
<updated>2012-05-26T10:17:51+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2012-05-15T15:55:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d5c88b735fdf2ef796bb937396dd58dac84e8407'/>
<id>urn:sha1:d5c88b735fdf2ef796bb937396dd58dac84e8407</id>
<content type='text'>
The key we store with a tree block backref is only a hint. It is set when
the ref is created and can remain correct for a long time. As the tree is
rebalanced, however, eventually the key no longer points to the correct
destination.

With this patch, we change find_parent_nodes to no longer add keys unless it
knows for sure they're correct (e.g. because they're for an extent data
backref). Then when we later encounter a backref ref with no parent and no
key set, we grab the block and take the first key from the block itself.

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
</entry>
<entry>
<title>Btrfs: bugfix in btrfs_find_parent_nodes</title>
<updated>2012-05-26T10:17:51+00:00</updated>
<author>
<name>Jan Schmidt</name>
<email>list.btrfs@jan-o-sch.net</email>
</author>
<published>2012-05-22T11:43:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=dadcaf78b51e239d93f5ec9aac736de99081ee74'/>
<id>urn:sha1:dadcaf78b51e239d93f5ec9aac736de99081ee74</id>
<content type='text'>
That one has been around since the addition of backref.c. Due to the way we
calculate our slot numbers, after adding inline refs we're missing one keyed
ref unless it's located at the beginning of a new leaf.

Reported-by: Alexander Block &lt;ablock84@googlemail.com&gt;
Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
</entry>
</feed>
