<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/fs/btrfs/backref.c, branch linux-3.13.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: Use WARN_ON()'s return value in place of WARN_ON(1)</title>
<updated>2013-11-12T03:11:53+00:00</updated>
<author>
<name>Dulshani Gunawardhana</name>
<email>dulshani.gunawardhana89@gmail.com</email>
</author>
<published>2013-10-31T05:00:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fae7f21cece9a4c181a8d8131870c7247e153f65'/>
<id>fae7f21cece9a4c181a8d8131870c7247e153f65</id>
<content type='text'>
Use WARN_ON()'s return value in place of WARN_ON(1) for cleaner source
code that outputs a more descriptive warnings. Also fix the styling
warning of redundant braces that came up as a result of this fix.

Signed-off-by: Dulshani Gunawardhana &lt;dulshani.gunawardhana89@gmail.com&gt;
Reviewed-by: Zach Brown &lt;zab@redhat.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>
Use WARN_ON()'s return value in place of WARN_ON(1) for cleaner source
code that outputs a more descriptive warnings. Also fix the styling
warning of redundant braces that came up as a result of this fix.

Signed-off-by: Dulshani Gunawardhana &lt;dulshani.gunawardhana89@gmail.com&gt;
Reviewed-by: Zach Brown &lt;zab@redhat.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: fix a crash when running balance and defrag concurrently</title>
<updated>2013-11-12T03:11:07+00:00</updated>
<author>
<name>Liu Bo</name>
<email>bo.li.liu@oracle.com</email>
</author>
<published>2013-10-30T05:25:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=48ec47364b6d493f0a9cdc116977bf3f34e5c3ec'/>
<id>48ec47364b6d493f0a9cdc116977bf3f34e5c3ec</id>
<content type='text'>
Running balance and defrag concurrently can end up with a crash:

kernel BUG at fs/btrfs/relocation.c:4528!
RIP: 0010:[&lt;ffffffffa01ac33b&gt;]  [&lt;ffffffffa01ac33b&gt;] btrfs_reloc_cow_block+ 0x1eb/0x230 [btrfs]
Call Trace:
  [&lt;ffffffffa01398c1&gt;] ? update_ref_for_cow+0x241/0x380 [btrfs]
  [&lt;ffffffffa0180bad&gt;] ? copy_extent_buffer+0xad/0x110 [btrfs]
  [&lt;ffffffffa0139da1&gt;] __btrfs_cow_block+0x3a1/0x520 [btrfs]
  [&lt;ffffffffa013a0b6&gt;] btrfs_cow_block+0x116/0x1b0 [btrfs]
  [&lt;ffffffffa013ddad&gt;] btrfs_search_slot+0x43d/0x970 [btrfs]
  [&lt;ffffffffa0153c57&gt;] btrfs_lookup_file_extent+0x37/0x40 [btrfs]
  [&lt;ffffffffa0172a5e&gt;] __btrfs_drop_extents+0x11e/0xae0 [btrfs]
  [&lt;ffffffffa013b3fd&gt;] ? generic_bin_search.constprop.39+0x8d/0x1a0 [btrfs]
  [&lt;ffffffff8117d14a&gt;] ? kmem_cache_alloc+0x1da/0x200
  [&lt;ffffffffa0138e7a&gt;] ? btrfs_alloc_path+0x1a/0x20 [btrfs]
  [&lt;ffffffffa0173ef0&gt;] btrfs_drop_extents+0x60/0x90 [btrfs]
  [&lt;ffffffffa016b24d&gt;] relink_extent_backref+0x2ed/0x780 [btrfs]
  [&lt;ffffffffa0162fe0&gt;] ? btrfs_submit_bio_hook+0x1e0/0x1e0 [btrfs]
  [&lt;ffffffffa01b8ed7&gt;] ? iterate_inodes_from_logical+0x87/0xa0 [btrfs]
  [&lt;ffffffffa016b909&gt;] btrfs_finish_ordered_io+0x229/0xac0 [btrfs]
  [&lt;ffffffffa016c3b5&gt;] finish_ordered_fn+0x15/0x20 [btrfs]
  [&lt;ffffffffa018cbe5&gt;] worker_loop+0x125/0x4e0 [btrfs]
  [&lt;ffffffffa018cac0&gt;] ? btrfs_queue_worker+0x300/0x300 [btrfs]
  [&lt;ffffffff81075ea0&gt;] kthread+0xc0/0xd0
  [&lt;ffffffff81075de0&gt;] ? insert_kthread_work+0x40/0x40
  [&lt;ffffffff8164796c&gt;] ret_from_fork+0x7c/0xb0
  [&lt;ffffffff81075de0&gt;] ? insert_kthread_work+0x40/0x40
----------------------------------------------------------------------

It turns out to be that balance operation will bump root's @last_snapshot,
which enables snapshot-aware defrag path, and backref walking stuff will
find data reloc tree as refs' parent, and hit the BUG_ON() during COW.

As data reloc tree's data is just for relocation purpose, and will be deleted right
after relocation is done, it's unnecessary to walk those refs belonged to data reloc
tree, it'd be better to skip them.

Signed-off-by: Liu Bo &lt;bo.li.liu@oracle.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>
Running balance and defrag concurrently can end up with a crash:

kernel BUG at fs/btrfs/relocation.c:4528!
RIP: 0010:[&lt;ffffffffa01ac33b&gt;]  [&lt;ffffffffa01ac33b&gt;] btrfs_reloc_cow_block+ 0x1eb/0x230 [btrfs]
Call Trace:
  [&lt;ffffffffa01398c1&gt;] ? update_ref_for_cow+0x241/0x380 [btrfs]
  [&lt;ffffffffa0180bad&gt;] ? copy_extent_buffer+0xad/0x110 [btrfs]
  [&lt;ffffffffa0139da1&gt;] __btrfs_cow_block+0x3a1/0x520 [btrfs]
  [&lt;ffffffffa013a0b6&gt;] btrfs_cow_block+0x116/0x1b0 [btrfs]
  [&lt;ffffffffa013ddad&gt;] btrfs_search_slot+0x43d/0x970 [btrfs]
  [&lt;ffffffffa0153c57&gt;] btrfs_lookup_file_extent+0x37/0x40 [btrfs]
  [&lt;ffffffffa0172a5e&gt;] __btrfs_drop_extents+0x11e/0xae0 [btrfs]
  [&lt;ffffffffa013b3fd&gt;] ? generic_bin_search.constprop.39+0x8d/0x1a0 [btrfs]
  [&lt;ffffffff8117d14a&gt;] ? kmem_cache_alloc+0x1da/0x200
  [&lt;ffffffffa0138e7a&gt;] ? btrfs_alloc_path+0x1a/0x20 [btrfs]
  [&lt;ffffffffa0173ef0&gt;] btrfs_drop_extents+0x60/0x90 [btrfs]
  [&lt;ffffffffa016b24d&gt;] relink_extent_backref+0x2ed/0x780 [btrfs]
  [&lt;ffffffffa0162fe0&gt;] ? btrfs_submit_bio_hook+0x1e0/0x1e0 [btrfs]
  [&lt;ffffffffa01b8ed7&gt;] ? iterate_inodes_from_logical+0x87/0xa0 [btrfs]
  [&lt;ffffffffa016b909&gt;] btrfs_finish_ordered_io+0x229/0xac0 [btrfs]
  [&lt;ffffffffa016c3b5&gt;] finish_ordered_fn+0x15/0x20 [btrfs]
  [&lt;ffffffffa018cbe5&gt;] worker_loop+0x125/0x4e0 [btrfs]
  [&lt;ffffffffa018cac0&gt;] ? btrfs_queue_worker+0x300/0x300 [btrfs]
  [&lt;ffffffff81075ea0&gt;] kthread+0xc0/0xd0
  [&lt;ffffffff81075de0&gt;] ? insert_kthread_work+0x40/0x40
  [&lt;ffffffff8164796c&gt;] ret_from_fork+0x7c/0xb0
  [&lt;ffffffff81075de0&gt;] ? insert_kthread_work+0x40/0x40
----------------------------------------------------------------------

It turns out to be that balance operation will bump root's @last_snapshot,
which enables snapshot-aware defrag path, and backref walking stuff will
find data reloc tree as refs' parent, and hit the BUG_ON() during COW.

As data reloc tree's data is just for relocation purpose, and will be deleted right
after relocation is done, it's unnecessary to walk those refs belonged to data reloc
tree, it'd be better to skip them.

Signed-off-by: Liu Bo &lt;bo.li.liu@oracle.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: drop unused parameter from btrfs_item_nr</title>
<updated>2013-11-12T02:50:48+00:00</updated>
<author>
<name>Ross Kirk</name>
<email>ross.kirk@gmail.com</email>
</author>
<published>2013-09-16T14:58:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=dd3cc16b8750251ea9b1a843ce7806e82b015d5e'/>
<id>dd3cc16b8750251ea9b1a843ce7806e82b015d5e</id>
<content type='text'>
Remove unused eb parameter from btrfs_item_nr

Signed-off-by: Ross Kirk &lt;ross.kirk@gmail.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.cz&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>
Remove unused eb parameter from btrfs_item_nr

Signed-off-by: Ross Kirk &lt;ross.kirk@gmail.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.cz&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: allocate prelim_ref with a slab allocater</title>
<updated>2013-09-01T12:16:27+00:00</updated>
<author>
<name>Wang Shilong</name>
<email>wangsl.fnst@cn.fujitsu.com</email>
</author>
<published>2013-08-09T05:25:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b9e9a6cbc6d25b89d8007e5a680319e07921ead8'/>
<id>b9e9a6cbc6d25b89d8007e5a680319e07921ead8</id>
<content type='text'>
struct __prelim_ref is allocated and freed frequently when
walking backref tree, using slab allocater can not only
speed up allocating but also detect memory leaks.

Signed-off-by: Wang Shilong &lt;wangsl.fnst@cn.fujitsu.com&gt;
Reviewed-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Reviewed-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&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>
struct __prelim_ref is allocated and freed frequently when
walking backref tree, using slab allocater can not only
speed up allocating but also detect memory leaks.

Signed-off-by: Wang Shilong &lt;wangsl.fnst@cn.fujitsu.com&gt;
Reviewed-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Reviewed-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&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: pass gfp_t to __add_prelim_ref() to avoid always using GFP_ATOMIC</title>
<updated>2013-09-01T12:16:26+00:00</updated>
<author>
<name>Wang Shilong</name>
<email>wangsl.fnst@cn.fujitsu.com</email>
</author>
<published>2013-08-06T02:29:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=742916b885edbc6453b4769458959929746e8e7e'/>
<id>742916b885edbc6453b4769458959929746e8e7e</id>
<content type='text'>
Currently, only add_delayed_refs have to allocate with GFP_ATOMIC,
So just pass arg 'gfp_t' to decide which allocation mode.

Signed-off-by: Wang Shilong &lt;wangsl.fnst@cn.fujitsu.com&gt;
Reviewed-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Reviewed-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&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>
Currently, only add_delayed_refs have to allocate with GFP_ATOMIC,
So just pass arg 'gfp_t' to decide which allocation mode.

Signed-off-by: Wang Shilong &lt;wangsl.fnst@cn.fujitsu.com&gt;
Reviewed-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Reviewed-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&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: get rid of sparse warnings</title>
<updated>2013-09-01T12:15:50+00:00</updated>
<author>
<name>Stefan Behrens</name>
<email>sbehrens@giantdisaster.de</email>
</author>
<published>2013-08-14T16:12:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=35a3621beb3e2face3e7954eaee20a8fa0043fac'/>
<id>35a3621beb3e2face3e7954eaee20a8fa0043fac</id>
<content type='text'>
make C=2 fs/btrfs/ CF=-D__CHECK_ENDIAN__

I tried to filter out the warnings for which patches have already
been sent to the mailing list, pending for inclusion in btrfs-next.

All these changes should be obviously safe.

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>
make C=2 fs/btrfs/ CF=-D__CHECK_ENDIAN__

I tried to filter out the warnings for which patches have already
been sent to the mailing list, pending for inclusion in btrfs-next.

All these changes should be obviously safe.

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: fix possible memory leak in find_parent_nodes()</title>
<updated>2013-09-01T12:04:56+00:00</updated>
<author>
<name>Wang Shilong</name>
<email>wangsl.fnst@cn.fujitsu.com</email>
</author>
<published>2013-08-08T05:04:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a4fdb61e81e73991d919ff0396d256e9e67d2475'/>
<id>a4fdb61e81e73991d919ff0396d256e9e67d2475</id>
<content type='text'>
Signed-off-by: Wang Shilong &lt;wangsl.fnst@cn.fujitsu.com&gt;
Reviewed-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>
Signed-off-by: Wang Shilong &lt;wangsl.fnst@cn.fujitsu.com&gt;
Reviewed-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: add missing error check to find_parent_nodes</title>
<updated>2013-09-01T12:04:44+00:00</updated>
<author>
<name>Filipe David Borba Manana</name>
<email>fdmanana@gmail.com</email>
</author>
<published>2013-07-30T23:26:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f5929cd814ca0a7012bf31d566c8bbd0cd469322'/>
<id>f5929cd814ca0a7012bf31d566c8bbd0cd469322</id>
<content type='text'>
Signed-off-by: Filipe David Borba Manana &lt;fdmanana@gmail.com&gt;
Reviewed-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&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>
Signed-off-by: Filipe David Borba Manana &lt;fdmanana@gmail.com&gt;
Reviewed-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&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: make sure the backref walker catches all refs to our extent</title>
<updated>2013-08-09T23:30:03+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fusionio.com</email>
</author>
<published>2013-07-05T18:03:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ed8c4913da4951957bf8afc788522788881ff405'/>
<id>ed8c4913da4951957bf8afc788522788881ff405</id>
<content type='text'>
Because we don't mess with the offset into the extent for compressed we will
properly find both extents for this case

[extent a][extent b][rest of extent a]

but because we already added a ref for the front half we won't add the inode
information for the second half.  This causes us to leak that memory and not
print out the other offset when we do logical-resolve.  So fix this by calling
ulist_add_merge and then add our eie to the existing entry if there is one.
With this patch we get both offsets out of logical-resolve.  With this and the
other 2 patches I've sent we now pass btrfs/276 on my vm with compress-force=lzo
set.  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>
Because we don't mess with the offset into the extent for compressed we will
properly find both extents for this case

[extent a][extent b][rest of extent a]

but because we already added a ref for the front half we won't add the inode
information for the second half.  This causes us to leak that memory and not
print out the other offset when we do logical-resolve.  So fix this by calling
ulist_add_merge and then add our eie to the existing entry if there is one.
With this patch we get both offsets out of logical-resolve.  With this and the
other 2 patches I've sent we now pass btrfs/276 on my vm with compress-force=lzo
set.  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>
