<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/fs/btrfs/relocation.c, branch linux-3.12.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>Btrfs: fix build_backref_tree issue with multiple shared blocks</title>
<updated>2014-10-31T14:11:05+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fb.com</email>
</author>
<published>2014-09-19T19:43:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b346e6df896c35f174c5613a78b97f4cea9143d6'/>
<id>b346e6df896c35f174c5613a78b97f4cea9143d6</id>
<content type='text'>
commit bbe9051441effce51c9a533d2c56440df64db2d7 upstream.

Marc Merlin sent me a broken fs image months ago where it would blow up in the
upper-&gt;checked BUG_ON() in build_backref_tree.  This is because we had a
scenario like this

block a -- level 4 (not shared)
   |
block b -- level 3 (reloc block, shared)
   |
block c -- level 2 (not shared)
   |
block d -- level 1 (shared)
   |
block e -- level 0 (shared)

We go to build a backref tree for block e, we notice block d is shared and add
it to the list of blocks to lookup it's backrefs for.  Now when we loop around
we will check edges for the block, so we will see we looked up block c last
time.  So we lookup block d and then see that the block that points to it is
block c and we can just skip that edge since we've already been up this path.
The problem is because we clear need_check when we see block d (as it is shared)
we never add block b as needing to be checked.  And because block c is in our
path already we bail out before we walk up to block b and add it to the backref
check list.

To fix this we need to reset need_check if we trip over a block that doesn't
need to be checked.  This will make sure that any subsequent blocks in the path
as we're walking up afterwards are added to the list to be processed.  With this
patch I can now mount Marc's fs image and it'll complete the balance without
panicing.  Thanks,

Reported-by: Marc MERLIN &lt;marc@merlins.org&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fb.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit bbe9051441effce51c9a533d2c56440df64db2d7 upstream.

Marc Merlin sent me a broken fs image months ago where it would blow up in the
upper-&gt;checked BUG_ON() in build_backref_tree.  This is because we had a
scenario like this

block a -- level 4 (not shared)
   |
block b -- level 3 (reloc block, shared)
   |
block c -- level 2 (not shared)
   |
block d -- level 1 (shared)
   |
block e -- level 0 (shared)

We go to build a backref tree for block e, we notice block d is shared and add
it to the list of blocks to lookup it's backrefs for.  Now when we loop around
we will check edges for the block, so we will see we looked up block c last
time.  So we lookup block d and then see that the block that points to it is
block c and we can just skip that edge since we've already been up this path.
The problem is because we clear need_check when we see block d (as it is shared)
we never add block b as needing to be checked.  And because block c is in our
path already we bail out before we walk up to block b and add it to the backref
check list.

To fix this we need to reset need_check if we trip over a block that doesn't
need to be checked.  This will make sure that any subsequent blocks in the path
as we're walking up afterwards are added to the list to be processed.  With this
patch I can now mount Marc's fs image and it'll complete the balance without
panicing.  Thanks,

Reported-by: Marc MERLIN &lt;marc@merlins.org&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fb.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: cleanup error handling in build_backref_tree</title>
<updated>2014-10-31T14:11:05+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fb.com</email>
</author>
<published>2014-09-19T14:40:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3ffb5771a40b0aa98c6c6de7976de5742f3d7c10'/>
<id>3ffb5771a40b0aa98c6c6de7976de5742f3d7c10</id>
<content type='text'>
commit 75bfb9aff45e44625260f52a5fd581b92ace3e62 upstream.

When balance panics it tends to panic in the

BUG_ON(!upper-&gt;checked);

test, because it means it couldn't build the backref tree properly.  This is
annoying to users and frankly a recoverable error, nothing in this function is
actually fatal since it is just an in-memory building of the backrefs for a
given bytenr.  So go through and change all the BUG_ON()'s to ASSERT()'s, and
fix the BUG_ON(!upper-&gt;checked) thing to just return an error.

This patch also fixes the error handling so it tears down the work we've done
properly.  This code was horribly broken since we always just panic'ed instead
of actually erroring out, so it needed to be completely re-worked.  With this
patch my broken image no longer panics when I mount it.  Thanks,

Signed-off-by: Josef Bacik &lt;jbacik@fb.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 75bfb9aff45e44625260f52a5fd581b92ace3e62 upstream.

When balance panics it tends to panic in the

BUG_ON(!upper-&gt;checked);

test, because it means it couldn't build the backref tree properly.  This is
annoying to users and frankly a recoverable error, nothing in this function is
actually fatal since it is just an in-memory building of the backrefs for a
given bytenr.  So go through and change all the BUG_ON()'s to ASSERT()'s, and
fix the BUG_ON(!upper-&gt;checked) thing to just return an error.

This patch also fixes the error handling so it tears down the work we've done
properly.  This code was horribly broken since we always just panic'ed instead
of actually erroring out, so it needed to be completely re-worked.  With this
patch my broken image no longer panics when I mount it.  Thanks,

Signed-off-by: Josef Bacik &lt;jbacik@fb.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: fix BUG_ON() casued by the reserved space migration</title>
<updated>2014-06-27T08:25:23+00:00</updated>
<author>
<name>Miao Xie</name>
<email>miaox@cn.fujitsu.com</email>
</author>
<published>2013-09-25T13:47:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9bf37c057d11c6a483a787965bb585e9ab5fa6ab'/>
<id>9bf37c057d11c6a483a787965bb585e9ab5fa6ab</id>
<content type='text'>
commit 20dd2cbf01888a91fdd921403040a710b275a1ff upstream.

When we did space balance and snapshot creation at the same time, we might
meet the following oops:
 kernel BUG at fs/btrfs/inode.c:3038!
 [SNIP]
 Call Trace:
 [&lt;ffffffffa0411ec7&gt;] btrfs_orphan_cleanup+0x293/0x407 [btrfs]
 [&lt;ffffffffa042dc45&gt;] btrfs_mksubvol.isra.28+0x259/0x373 [btrfs]
 [&lt;ffffffffa042de85&gt;] btrfs_ioctl_snap_create_transid+0x126/0x156 [btrfs]
 [&lt;ffffffffa042dff1&gt;] btrfs_ioctl_snap_create_v2+0xd0/0x121 [btrfs]
 [&lt;ffffffffa0430b2c&gt;] btrfs_ioctl+0x414/0x1854 [btrfs]
 [&lt;ffffffff813b60b7&gt;] ? __do_page_fault+0x305/0x379
 [&lt;ffffffff811215a9&gt;] vfs_ioctl+0x1d/0x39
 [&lt;ffffffff81121d7c&gt;] do_vfs_ioctl+0x32d/0x3e2
 [&lt;ffffffff81057fe7&gt;] ? finish_task_switch+0x80/0xb8
 [&lt;ffffffff81121e88&gt;] SyS_ioctl+0x57/0x83
 [&lt;ffffffff813b39ff&gt;] ? do_device_not_available+0x12/0x14
 [&lt;ffffffff813b99c2&gt;] system_call_fastpath+0x16/0x1b
 [SNIP]
 RIP  [&lt;ffffffffa040da40&gt;] btrfs_orphan_add+0xc3/0x126 [btrfs]

The reason of the problem is that the relocation root creation stole
the reserved space, which was reserved for orphan item deletion.

There are several ways to fix this problem, one is to increasing
the reserved space size of the space balace, and then we can use
that space to create the relocation tree for each fs/file trees.
But it is hard to calculate the suitable size because we doesn't
know how many fs/file trees we need relocate.

We fixed this problem by reserving the space for relocation root creation
actively since the space it need is very small (one tree block, used for
root node copy), then we use that reserved space to create the
relocation tree. If we don't reserve space for relocation tree creation,
we will use the reserved space of the balance.

Signed-off-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 20dd2cbf01888a91fdd921403040a710b275a1ff upstream.

When we did space balance and snapshot creation at the same time, we might
meet the following oops:
 kernel BUG at fs/btrfs/inode.c:3038!
 [SNIP]
 Call Trace:
 [&lt;ffffffffa0411ec7&gt;] btrfs_orphan_cleanup+0x293/0x407 [btrfs]
 [&lt;ffffffffa042dc45&gt;] btrfs_mksubvol.isra.28+0x259/0x373 [btrfs]
 [&lt;ffffffffa042de85&gt;] btrfs_ioctl_snap_create_transid+0x126/0x156 [btrfs]
 [&lt;ffffffffa042dff1&gt;] btrfs_ioctl_snap_create_v2+0xd0/0x121 [btrfs]
 [&lt;ffffffffa0430b2c&gt;] btrfs_ioctl+0x414/0x1854 [btrfs]
 [&lt;ffffffff813b60b7&gt;] ? __do_page_fault+0x305/0x379
 [&lt;ffffffff811215a9&gt;] vfs_ioctl+0x1d/0x39
 [&lt;ffffffff81121d7c&gt;] do_vfs_ioctl+0x32d/0x3e2
 [&lt;ffffffff81057fe7&gt;] ? finish_task_switch+0x80/0xb8
 [&lt;ffffffff81121e88&gt;] SyS_ioctl+0x57/0x83
 [&lt;ffffffff813b39ff&gt;] ? do_device_not_available+0x12/0x14
 [&lt;ffffffff813b99c2&gt;] system_call_fastpath+0x16/0x1b
 [SNIP]
 RIP  [&lt;ffffffffa040da40&gt;] btrfs_orphan_add+0xc3/0x126 [btrfs]

The reason of the problem is that the relocation root creation stole
the reserved space, which was reserved for orphan item deletion.

There are several ways to fix this problem, one is to increasing
the reserved space size of the space balace, and then we can use
that space to create the relocation tree for each fs/file trees.
But it is hard to calculate the suitable size because we doesn't
know how many fs/file trees we need relocate.

We fixed this problem by reserving the space for relocation root creation
actively since the space it need is very small (one tree block, used for
root node copy), then we use that reserved space to create the
relocation tree. If we don't reserve space for relocation tree creation,
we will use the reserved space of the balance.

Signed-off-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: relocate csums properly with prealloc extents</title>
<updated>2013-11-29T19:27:52+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fusionio.com</email>
</author>
<published>2013-09-27T13:33:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f9bbe6ea80e700ee620ef26902eb2decec17b258'/>
<id>f9bbe6ea80e700ee620ef26902eb2decec17b258</id>
<content type='text'>
commit 4577b014d1bc3db386da3246f625888fc48083a9 upstream.

A user reported a problem where they were getting csum errors when running a
balance and running systemd's journal.  This is because systemd is awesome and
fallocate()'s its log space and writes into it.  Unfortunately we assume that
when we read in all the csums for an extent that they are sequential starting at
the bytenr we care about.  This obviously isn't the case for prealloc extents,
where we could have written to the middle of the prealloc extent only, which
means the csum would be for the bytenr in the middle of our range and not the
front of our range.  Fix this by offsetting the new bytenr we are logging to
based on the original bytenr the csum was for.  With this patch I no longer see
the csum errors I was seeing.  Thanks,

Reported-by: Chris Murphy &lt;lists@colorremedies.com&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 4577b014d1bc3db386da3246f625888fc48083a9 upstream.

A user reported a problem where they were getting csum errors when running a
balance and running systemd's journal.  This is because systemd is awesome and
fallocate()'s its log space and writes into it.  Unfortunately we assume that
when we read in all the csums for an extent that they are sequential starting at
the bytenr we care about.  This obviously isn't the case for prealloc extents,
where we could have written to the middle of the prealloc extent only, which
means the csum would be for the bytenr in the middle of our range and not the
front of our range.  Fix this by offsetting the new bytenr we are logging to
based on the original bytenr the csum was for.  With this patch I no longer see
the csum errors I was seeing.  Thanks,

Reported-by: Chris Murphy &lt;lists@colorremedies.com&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: fix oops caused by the space balance and dead roots</title>
<updated>2013-10-11T01:31:02+00:00</updated>
<author>
<name>Miao Xie</name>
<email>miaox@cn.fujitsu.com</email>
</author>
<published>2013-09-25T13:47:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c00869f1ae6a8fa49802d5e60d843b7051a112ec'/>
<id>c00869f1ae6a8fa49802d5e60d843b7051a112ec</id>
<content type='text'>
When doing space balance and subvolume destroy at the same time, we met
the following oops:

kernel BUG at fs/btrfs/relocation.c:2247!
RIP: 0010: [&lt;ffffffffa04cec16&gt;] prepare_to_merge+0x154/0x1f0 [btrfs]
Call Trace:
 [&lt;ffffffffa04b5ab7&gt;] relocate_block_group+0x466/0x4e6 [btrfs]
 [&lt;ffffffffa04b5c7a&gt;] btrfs_relocate_block_group+0x143/0x275 [btrfs]
 [&lt;ffffffffa0495c56&gt;] btrfs_relocate_chunk.isra.27+0x5c/0x5a2 [btrfs]
 [&lt;ffffffffa0459871&gt;] ? btrfs_item_key_to_cpu+0x15/0x31 [btrfs]
 [&lt;ffffffffa048b46a&gt;] ? btrfs_get_token_64+0x7e/0xcd [btrfs]
 [&lt;ffffffffa04a3467&gt;] ? btrfs_tree_read_unlock_blocking+0xb2/0xb7 [btrfs]
 [&lt;ffffffffa049907d&gt;] btrfs_balance+0x9c7/0xb6f [btrfs]
 [&lt;ffffffffa049ef84&gt;] btrfs_ioctl_balance+0x234/0x2ac [btrfs]
 [&lt;ffffffffa04a1e8e&gt;] btrfs_ioctl+0xd87/0x1ef9 [btrfs]
 [&lt;ffffffff81122f53&gt;] ? path_openat+0x234/0x4db
 [&lt;ffffffff813c3b78&gt;] ? __do_page_fault+0x31d/0x391
 [&lt;ffffffff810f8ab6&gt;] ? vma_link+0x74/0x94
 [&lt;ffffffff811250f5&gt;] vfs_ioctl+0x1d/0x39
 [&lt;ffffffff811258c8&gt;] do_vfs_ioctl+0x32d/0x3e2
 [&lt;ffffffff811259d4&gt;] SyS_ioctl+0x57/0x83
 [&lt;ffffffff813c3bfa&gt;] ? do_page_fault+0xe/0x10
 [&lt;ffffffff813c73c2&gt;] system_call_fastpath+0x16/0x1b

It is because we returned the error number if the reference of the root was 0
when doing space relocation. It was not right here, because though the root
was dead(refs == 0), but the space it held still need be relocated, or we
could not remove the block group. So in this case, we should return the root
no matter it is dead or not.

Signed-off-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When doing space balance and subvolume destroy at the same time, we met
the following oops:

kernel BUG at fs/btrfs/relocation.c:2247!
RIP: 0010: [&lt;ffffffffa04cec16&gt;] prepare_to_merge+0x154/0x1f0 [btrfs]
Call Trace:
 [&lt;ffffffffa04b5ab7&gt;] relocate_block_group+0x466/0x4e6 [btrfs]
 [&lt;ffffffffa04b5c7a&gt;] btrfs_relocate_block_group+0x143/0x275 [btrfs]
 [&lt;ffffffffa0495c56&gt;] btrfs_relocate_chunk.isra.27+0x5c/0x5a2 [btrfs]
 [&lt;ffffffffa0459871&gt;] ? btrfs_item_key_to_cpu+0x15/0x31 [btrfs]
 [&lt;ffffffffa048b46a&gt;] ? btrfs_get_token_64+0x7e/0xcd [btrfs]
 [&lt;ffffffffa04a3467&gt;] ? btrfs_tree_read_unlock_blocking+0xb2/0xb7 [btrfs]
 [&lt;ffffffffa049907d&gt;] btrfs_balance+0x9c7/0xb6f [btrfs]
 [&lt;ffffffffa049ef84&gt;] btrfs_ioctl_balance+0x234/0x2ac [btrfs]
 [&lt;ffffffffa04a1e8e&gt;] btrfs_ioctl+0xd87/0x1ef9 [btrfs]
 [&lt;ffffffff81122f53&gt;] ? path_openat+0x234/0x4db
 [&lt;ffffffff813c3b78&gt;] ? __do_page_fault+0x31d/0x391
 [&lt;ffffffff810f8ab6&gt;] ? vma_link+0x74/0x94
 [&lt;ffffffff811250f5&gt;] vfs_ioctl+0x1d/0x39
 [&lt;ffffffff811258c8&gt;] do_vfs_ioctl+0x32d/0x3e2
 [&lt;ffffffff811259d4&gt;] SyS_ioctl+0x57/0x83
 [&lt;ffffffff813c3bfa&gt;] ? do_page_fault+0xe/0x10
 [&lt;ffffffff813c73c2&gt;] system_call_fastpath+0x16/0x1b

It is because we returned the error number if the reference of the root was 0
when doing space relocation. It was not right here, because though the root
was dead(refs == 0), but the space it held still need be relocated, or we
could not remove the block group. So in this case, we should return the root
no matter it is dead or not.

Signed-off-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: kill delay_iput arg to the wait_ordered functions</title>
<updated>2013-09-21T15:05:27+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fusionio.com</email>
</author>
<published>2013-09-17T14:55:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f0de181c9b48a397c5a2fbe63dcdd2a26a872695'/>
<id>f0de181c9b48a397c5a2fbe63dcdd2a26a872695</id>
<content type='text'>
This is a left over of how we used to wait for ordered extents, which was to
grab the inode and then run filemap flush on it.  However if we have an ordered
extent then we already are holding a ref on the inode, and we just use
btrfs_start_ordered_extent anyway, so there is no reason to have an extra ref on
the inode to start work on the ordered extent.  Thanks,

Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a left over of how we used to wait for ordered extents, which was to
grab the inode and then run filemap flush on it.  However if we have an ordered
extent then we already are holding a ref on the inode, and we just use
btrfs_start_ordered_extent anyway, so there is no reason to have an extra ref on
the inode to start work on the ordered extent.  Thanks,

Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: fixup error handling in btrfs_reloc_cow</title>
<updated>2013-09-21T14:58:54+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fusionio.com</email>
</author>
<published>2013-08-30T19:09:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=83d4cfd4da57b6ff16296875a962de2158799de6'/>
<id>83d4cfd4da57b6ff16296875a962de2158799de6</id>
<content type='text'>
If we failed to actually allocate the correct size of the extent to relocate we
will end up in an infinite loop because we won't return an error, we'll just
move on to the next extent.  So fix this up by returning an error, and then fix
all the callers to return an error up the stack rather than BUG_ON()'ing.
Thanks,

Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we failed to actually allocate the correct size of the extent to relocate we
will end up in an infinite loop because we won't return an error, we'll just
move on to the next extent.  So fix this up by returning an error, and then fix
all the callers to return an error up the stack rather than BUG_ON()'ing.
Thanks,

Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrf: cleanup: don't check for root_refs == 0 twice</title>
<updated>2013-09-01T12:16:29+00:00</updated>
<author>
<name>Stefan Behrens</name>
<email>sbehrens@giantdisaster.de</email>
</author>
<published>2013-08-23T08:34:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=23fa76b0ba78b7d84708d9ee683587d8a5bbceef'/>
<id>23fa76b0ba78b7d84708d9ee683587d8a5bbceef</id>
<content type='text'>
btrfs_read_fs_root_no_name() already checks if btrfs_root_refs()
is zero and returns ENOENT in this case. There is no need to do
it again in three more places.

Signed-off-by: Stefan Behrens &lt;sbehrens@giantdisaster.de&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
btrfs_read_fs_root_no_name() already checks if btrfs_root_refs()
is zero and returns ENOENT in this case. There is no need to do
it again in three more places.

Signed-off-by: Stefan Behrens &lt;sbehrens@giantdisaster.de&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: Remove superfluous casts from u64 to unsigned long long</title>
<updated>2013-09-01T12:16:08+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2013-08-20T11:20:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c1c9ff7c94e83fae89a742df74db51156869bad5'/>
<id>c1c9ff7c94e83fae89a742df74db51156869bad5</id>
<content type='text'>
u64 is "unsigned long long" on all architectures now, so there's no need to
cast it when formatting it using the "ll" length modifier.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
u64 is "unsigned long long" on all architectures now, so there's no need to
cast it when formatting it using the "ll" length modifier.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: change how we queue blocks for backref checking</title>
<updated>2013-09-01T12:04:41+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fusionio.com</email>
</author>
<published>2013-07-30T20:30:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b6c60c8018c4e9beb2f83fc82c09f9d033766571'/>
<id>b6c60c8018c4e9beb2f83fc82c09f9d033766571</id>
<content type='text'>
Previously we only added blocks to the list to have their backrefs checked if
the level of the block is right above the one we are searching for.  This is
because we want to make sure we don't add the entire path up to the root to the
lists to make sure we process things one at a time.  This assumes that if any
blocks in the path to the root are going to be not checked (shared in other
words) then they will be in the level right above the current block on up.  This
isn't quite right though since we can have blocks higher up the list that are
shared because they are attached to a reloc root.  But we won't add this block
to be checked and then later on we will BUG_ON(!upper-&gt;checked).  So instead
keep track of wether or not we've queued a block to be checked in this current
search, and if we haven't go ahead and queue it to be checked.  This patch fixed
the panic I was seeing where we BUG_ON(!upper-&gt;checked).  Thanks,

Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously we only added blocks to the list to have their backrefs checked if
the level of the block is right above the one we are searching for.  This is
because we want to make sure we don't add the entire path up to the root to the
lists to make sure we process things one at a time.  This assumes that if any
blocks in the path to the root are going to be not checked (shared in other
words) then they will be in the level right above the current block on up.  This
isn't quite right though since we can have blocks higher up the list that are
shared because they are attached to a reloc root.  But we won't add this block
to be checked and then later on we will BUG_ON(!upper-&gt;checked).  So instead
keep track of wether or not we've queued a block to be checked in this current
search, and if we haven't go ahead and queue it to be checked.  This patch fixed
the panic I was seeing where we BUG_ON(!upper-&gt;checked).  Thanks,

Signed-off-by: Josef Bacik &lt;jbacik@fusionio.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
