<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git, branch v3.12.6</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>Linux 3.12.6</title>
<updated>2013-12-20T15:51:33+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-12-20T15:51:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=d0266db287d492abe63e19859ad99dd232bc0e89'/>
<id>d0266db287d492abe63e19859ad99dd232bc0e89</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: OMAP2+: hwmod: Fix SOFTRESET logic</title>
<updated>2013-12-20T15:49:10+00:00</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2013-12-09T01:39:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=8dc40be171d20d92795f7f4f6cc53cb6eb57920d'/>
<id>8dc40be171d20d92795f7f4f6cc53cb6eb57920d</id>
<content type='text'>
commit 313a76ee11cda6700548afe68499ef174a240688 upstream.

In _ocp_softreset(), after _set_softreset() + write_sysconfig(),
the hwmod's sysc_cache will always contain SOFTRESET bit set
so all further writes to sysconfig using this cache will initiate
a repeated SOFTRESET e.g. enable_sysc(). This is true for OMAP3 like
platforms that have RESET_DONE status in the SYSSTATUS register and
so the the SOFTRESET bit in SYSCONFIG is not automatically cleared.
It is not a problem for OMAP4 like platforms that indicate RESET
completion by clearing the SOFTRESET bit in the SYSCONFIG register.

This repeated SOFTRESET is undesired and was the root cause of
USB host issues on OMAP3 platforms when hwmod was allowed to do the
SOFTRESET for the USB Host module.

To fix this we clear the SOFTRESET bit and update the sysconfig
register + sysc_cache using write_sysconfig().

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Tested-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt; # Panda, BeagleXM
[paul@pwsan.com: renamed _clr_softreset() to _clear_softreset()]
Signed-off-by: Paul Walmsley &lt;paul@pwsan.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 313a76ee11cda6700548afe68499ef174a240688 upstream.

In _ocp_softreset(), after _set_softreset() + write_sysconfig(),
the hwmod's sysc_cache will always contain SOFTRESET bit set
so all further writes to sysconfig using this cache will initiate
a repeated SOFTRESET e.g. enable_sysc(). This is true for OMAP3 like
platforms that have RESET_DONE status in the SYSSTATUS register and
so the the SOFTRESET bit in SYSCONFIG is not automatically cleared.
It is not a problem for OMAP4 like platforms that indicate RESET
completion by clearing the SOFTRESET bit in the SYSCONFIG register.

This repeated SOFTRESET is undesired and was the root cause of
USB host issues on OMAP3 platforms when hwmod was allowed to do the
SOFTRESET for the USB Host module.

To fix this we clear the SOFTRESET bit and update the sysconfig
register + sysc_cache using write_sysconfig().

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Tested-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt; # Panda, BeagleXM
[paul@pwsan.com: renamed _clr_softreset() to _clear_softreset()]
Signed-off-by: Paul Walmsley &lt;paul@pwsan.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915/vlv: fix up broken precision in vlv_crtc_clock_get</title>
<updated>2013-12-20T15:49:10+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2013-09-25T21:24:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=fd7a5ac9b59e74544181598fba54fd843b878db4'/>
<id>fd7a5ac9b59e74544181598fba54fd843b878db4</id>
<content type='text'>
commit 662c6ecbcdca1fe8a5402f6c83d98d242917a043 upstream.

With some divider values we end up with the wrong result.  So remove the
intermediates (like Ville suggested in the first place) to get the right
answer.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.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 662c6ecbcdca1fe8a5402f6c83d98d242917a043 upstream.

With some divider values we end up with the wrong result.  So remove the
intermediates (like Ville suggested in the first place) to get the right
answer.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915/vlv: add VLV specific clock_get function v3</title>
<updated>2013-12-20T15:49:10+00:00</updated>
<author>
<name>Jesse Barnes</name>
<email>jbarnes@virtuousgeek.org</email>
</author>
<published>2013-09-20T18:29:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=7870bfa3a3516aa89db7c7260fa0e524850b2a56'/>
<id>7870bfa3a3516aa89db7c7260fa0e524850b2a56</id>
<content type='text'>
commit acbec814a27f233b5ddb88a1bcaa2ac20daf64e0 upstream.

Calculation is a little different than other platforms.

v2: update to use port_clock instead
    rebase on top of Ville's changes
v3: update to new port_clock semantics - don't divide by
    pixel_multiplier (Ville)

References: https://bugs.freedesktop.org/show_bug.cgi?id=67345
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.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 acbec814a27f233b5ddb88a1bcaa2ac20daf64e0 upstream.

Calculation is a little different than other platforms.

v2: update to use port_clock instead
    rebase on top of Ville's changes
v3: update to new port_clock semantics - don't divide by
    pixel_multiplier (Ville)

References: https://bugs.freedesktop.org/show_bug.cgi?id=67345
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>i915/vlv: untangle integrated clock source handling v4</title>
<updated>2013-12-20T15:49:10+00:00</updated>
<author>
<name>Jesse Barnes</name>
<email>jbarnes@virtuousgeek.org</email>
</author>
<published>2013-10-01T17:41:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=132f0f7878670e74b20699037b6f79919491a228'/>
<id>132f0f7878670e74b20699037b6f79919491a228</id>
<content type='text'>
commit f60711666bcab6df2c6c91d851e07ed54088453c upstream.

The global integrated clock source bit resides in DPLL B on VLV, but we
were treating it as a per-pipe resource.  It needs to be set whenever
any PLL is active, so pull setting the bit out of vlv_update_pll and
into vlv_enable_pll.  Also add a vlv_disable_pll to prevent disabling it
when pipe B shuts down.

I'm guessing on the references here, I expect this to bite any config
where multiple displays are active or displays are moved from pipe to
pipe.

v2: re-add bits in vlv_update_pll to keep from confusing the state checker
v3: use enum pipe checks (Daniel)
    set CRI clock source early (Ville)
    consistently set CRI clock source everywhere (Ville)
v4: drop unnecessary setting of bit in vlv enable pll (Ville)

References: https://bugs.freedesktop.org/show_bug.cgi?id=67245
References: https://bugs.freedesktop.org/show_bug.cgi?id=69693
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
[danvet: s/1/PIPE_B/]
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.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 f60711666bcab6df2c6c91d851e07ed54088453c upstream.

The global integrated clock source bit resides in DPLL B on VLV, but we
were treating it as a per-pipe resource.  It needs to be set whenever
any PLL is active, so pull setting the bit out of vlv_update_pll and
into vlv_enable_pll.  Also add a vlv_disable_pll to prevent disabling it
when pipe B shuts down.

I'm guessing on the references here, I expect this to bite any config
where multiple displays are active or displays are moved from pipe to
pipe.

v2: re-add bits in vlv_update_pll to keep from confusing the state checker
v3: use enum pipe checks (Daniel)
    set CRI clock source early (Ville)
    consistently set CRI clock source everywhere (Ville)
v4: drop unnecessary setting of bit in vlv enable pll (Ville)

References: https://bugs.freedesktop.org/show_bug.cgi?id=67245
References: https://bugs.freedesktop.org/show_bug.cgi?id=69693
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
[danvet: s/1/PIPE_B/]
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: fix lockdep error in async commit</title>
<updated>2013-12-20T15:49:09+00:00</updated>
<author>
<name>Liu Bo</name>
<email>bo.li.liu@oracle.com</email>
</author>
<published>2013-11-06T08:57:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=5298b6d3c8abeee370055238d1ede81ec4daebc5'/>
<id>5298b6d3c8abeee370055238d1ede81ec4daebc5</id>
<content type='text'>
commit b1a06a4b574996692b72b742bf6e6aa0c711a948 upstream.

Lockdep complains about btrfs's async commit:

[ 2372.462171] [ BUG: bad unlock balance detected! ]
[ 2372.462191] 3.12.0+ #32 Tainted: G        W
[ 2372.462209] -------------------------------------
[ 2372.462228] ceph-osd/14048 is trying to release lock (sb_internal) at:
[ 2372.462275] [&lt;ffffffffa022cb10&gt;] btrfs_commit_transaction_async+0x1b0/0x2a0 [btrfs]
[ 2372.462305] but there are no more locks to release!
[ 2372.462324]
[ 2372.462324] other info that might help us debug this:
[ 2372.462349] no locks held by ceph-osd/14048.
[ 2372.462367]
[ 2372.462367] stack backtrace:
[ 2372.462386] CPU: 2 PID: 14048 Comm: ceph-osd Tainted: G        W    3.12.0+ #32
[ 2372.462414] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./To be filled by O.E.M., BIOS 080015  11/09/2011
[ 2372.462455]  ffffffffa022cb10 ffff88007490fd28 ffffffff816f094a ffff8800378aa320
[ 2372.462491]  ffff88007490fd50 ffffffff810adf4c ffff8800378aa320 ffff88009af97650
[ 2372.462526]  ffffffffa022cb10 ffff88007490fd88 ffffffff810b01ee ffff8800898c0000
[ 2372.462562] Call Trace:
[ 2372.462584]  [&lt;ffffffffa022cb10&gt;] ? btrfs_commit_transaction_async+0x1b0/0x2a0 [btrfs]
[ 2372.462619]  [&lt;ffffffff816f094a&gt;] dump_stack+0x45/0x56
[ 2372.462642]  [&lt;ffffffff810adf4c&gt;] print_unlock_imbalance_bug+0xec/0x100
[ 2372.462677]  [&lt;ffffffffa022cb10&gt;] ? btrfs_commit_transaction_async+0x1b0/0x2a0 [btrfs]
[ 2372.462710]  [&lt;ffffffff810b01ee&gt;] lock_release+0x18e/0x210
[ 2372.462742]  [&lt;ffffffffa022cb36&gt;] btrfs_commit_transaction_async+0x1d6/0x2a0 [btrfs]
[ 2372.462783]  [&lt;ffffffffa025a7ce&gt;] btrfs_ioctl_start_sync+0x3e/0xc0 [btrfs]
[ 2372.462822]  [&lt;ffffffffa025f1d3&gt;] btrfs_ioctl+0x4c3/0x1f70 [btrfs]
[ 2372.462849]  [&lt;ffffffff812c0321&gt;] ? avc_has_perm+0x121/0x1b0
[ 2372.462873]  [&lt;ffffffff812c0224&gt;] ? avc_has_perm+0x24/0x1b0
[ 2372.462897]  [&lt;ffffffff8107ecc8&gt;] ? sched_clock_cpu+0xa8/0x100
[ 2372.462922]  [&lt;ffffffff8117b145&gt;] do_vfs_ioctl+0x2e5/0x4e0
[ 2372.462946]  [&lt;ffffffff812c19e6&gt;] ? file_has_perm+0x86/0xa0
[ 2372.462969]  [&lt;ffffffff8117b3c1&gt;] SyS_ioctl+0x81/0xa0
[ 2372.462991]  [&lt;ffffffff817045a4&gt;] tracesys+0xdd/0xe2

====================================================

It's because that we don't do the right thing when checking if it's ok to
tell lockdep that we're trying to release the rwsem.

If the trans handle's type is TRANS_ATTACH, we won't acquire the freeze rwsem, but
as TRANS_ATTACH fits the check (trans &lt; TRANS_JOIN_NOLOCK), we'll release the freeze
rwsem, which makes lockdep complains a lot.

Reported-by: Ma Jianpeng &lt;majianpeng@gmail.com&gt;
Signed-off-by: Liu Bo &lt;bo.li.liu@oracle.com&gt;
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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

Lockdep complains about btrfs's async commit:

[ 2372.462171] [ BUG: bad unlock balance detected! ]
[ 2372.462191] 3.12.0+ #32 Tainted: G        W
[ 2372.462209] -------------------------------------
[ 2372.462228] ceph-osd/14048 is trying to release lock (sb_internal) at:
[ 2372.462275] [&lt;ffffffffa022cb10&gt;] btrfs_commit_transaction_async+0x1b0/0x2a0 [btrfs]
[ 2372.462305] but there are no more locks to release!
[ 2372.462324]
[ 2372.462324] other info that might help us debug this:
[ 2372.462349] no locks held by ceph-osd/14048.
[ 2372.462367]
[ 2372.462367] stack backtrace:
[ 2372.462386] CPU: 2 PID: 14048 Comm: ceph-osd Tainted: G        W    3.12.0+ #32
[ 2372.462414] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./To be filled by O.E.M., BIOS 080015  11/09/2011
[ 2372.462455]  ffffffffa022cb10 ffff88007490fd28 ffffffff816f094a ffff8800378aa320
[ 2372.462491]  ffff88007490fd50 ffffffff810adf4c ffff8800378aa320 ffff88009af97650
[ 2372.462526]  ffffffffa022cb10 ffff88007490fd88 ffffffff810b01ee ffff8800898c0000
[ 2372.462562] Call Trace:
[ 2372.462584]  [&lt;ffffffffa022cb10&gt;] ? btrfs_commit_transaction_async+0x1b0/0x2a0 [btrfs]
[ 2372.462619]  [&lt;ffffffff816f094a&gt;] dump_stack+0x45/0x56
[ 2372.462642]  [&lt;ffffffff810adf4c&gt;] print_unlock_imbalance_bug+0xec/0x100
[ 2372.462677]  [&lt;ffffffffa022cb10&gt;] ? btrfs_commit_transaction_async+0x1b0/0x2a0 [btrfs]
[ 2372.462710]  [&lt;ffffffff810b01ee&gt;] lock_release+0x18e/0x210
[ 2372.462742]  [&lt;ffffffffa022cb36&gt;] btrfs_commit_transaction_async+0x1d6/0x2a0 [btrfs]
[ 2372.462783]  [&lt;ffffffffa025a7ce&gt;] btrfs_ioctl_start_sync+0x3e/0xc0 [btrfs]
[ 2372.462822]  [&lt;ffffffffa025f1d3&gt;] btrfs_ioctl+0x4c3/0x1f70 [btrfs]
[ 2372.462849]  [&lt;ffffffff812c0321&gt;] ? avc_has_perm+0x121/0x1b0
[ 2372.462873]  [&lt;ffffffff812c0224&gt;] ? avc_has_perm+0x24/0x1b0
[ 2372.462897]  [&lt;ffffffff8107ecc8&gt;] ? sched_clock_cpu+0xa8/0x100
[ 2372.462922]  [&lt;ffffffff8117b145&gt;] do_vfs_ioctl+0x2e5/0x4e0
[ 2372.462946]  [&lt;ffffffff812c19e6&gt;] ? file_has_perm+0x86/0xa0
[ 2372.462969]  [&lt;ffffffff8117b3c1&gt;] SyS_ioctl+0x81/0xa0
[ 2372.462991]  [&lt;ffffffff817045a4&gt;] tracesys+0xdd/0xe2

====================================================

It's because that we don't do the right thing when checking if it's ok to
tell lockdep that we're trying to release the rwsem.

If the trans handle's type is TRANS_ATTACH, we won't acquire the freeze rwsem, but
as TRANS_ATTACH fits the check (trans &lt; TRANS_JOIN_NOLOCK), we'll release the freeze
rwsem, which makes lockdep complains a lot.

Reported-by: Ma Jianpeng &lt;majianpeng@gmail.com&gt;
Signed-off-by: Liu Bo &lt;bo.li.liu@oracle.com&gt;
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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: fix a crash when running balance and defrag concurrently</title>
<updated>2013-12-20T15:49:09+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.exis.tech/linux.git/commit/?id=6f01df1850af8131a45bcd8f87b58d937af5140c'/>
<id>6f01df1850af8131a45bcd8f87b58d937af5140c</id>
<content type='text'>
commit 48ec47364b6d493f0a9cdc116977bf3f34e5c3ec upstream.

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;
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 48ec47364b6d493f0a9cdc116977bf3f34e5c3ec upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: do not run snapshot-aware defragment on error</title>
<updated>2013-12-20T15:49:09+00:00</updated>
<author>
<name>Liu Bo</name>
<email>bo.li.liu@oracle.com</email>
</author>
<published>2013-10-29T02:45:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=9e5787dec9c785cc58e27c03d9c3e5536d18698a'/>
<id>9e5787dec9c785cc58e27c03d9c3e5536d18698a</id>
<content type='text'>
commit 6f519564d7d978c00351d9ab6abac3deeac31621 upstream.

If something wrong happens in write endio, running snapshot-aware defragment
can end up with undefined results, maybe a crash, so we should avoid it.

In order to share similar code, this also adds a helper to free the struct for
snapshot-aware defrag.

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;
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 6f519564d7d978c00351d9ab6abac3deeac31621 upstream.

If something wrong happens in write endio, running snapshot-aware defragment
can end up with undefined results, maybe a crash, so we should avoid it.

In order to share similar code, this also adds a helper to free the struct for
snapshot-aware defrag.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: take ordered root lock when removing ordered operations inode</title>
<updated>2013-12-20T15:49:09+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fusionio.com</email>
</author>
<published>2013-10-28T13:13:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=486d1e163be2d32150a053c7ac3fc853ba6fd998'/>
<id>486d1e163be2d32150a053c7ac3fc853ba6fd998</id>
<content type='text'>
commit 93858769172c4e3678917810e9d5de360eb991cc upstream.

A user reported a list corruption warning from btrfs_remove_ordered_extent, it
is because we aren't taking the ordered_root_lock when we remove the inode from
the ordered operations list.  Thanks,

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 93858769172c4e3678917810e9d5de360eb991cc upstream.

A user reported a list corruption warning from btrfs_remove_ordered_extent, it
is because we aren't taking the ordered_root_lock when we remove the inode from
the ordered operations list.  Thanks,

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: stop using vfs_read in send</title>
<updated>2013-12-20T15:49:09+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fusionio.com</email>
</author>
<published>2013-10-25T15:36:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=222ae8bfd4c3796335d2aa1aa6a4dbeccb497b00'/>
<id>222ae8bfd4c3796335d2aa1aa6a4dbeccb497b00</id>
<content type='text'>
commit ed2590953bd06b892f0411fc94e19175d32f197a upstream.

Apparently we don't actually close the files until we return to userspace, so
stop using vfs_read in send.  This is actually better for us since we can avoid
all the extra logic of holding the file we're sending open and making sure to
clean it up.  This will fix people who have been hitting too many files open
errors when trying to send.  Thanks,

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 ed2590953bd06b892f0411fc94e19175d32f197a upstream.

Apparently we don't actually close the files until we return to userspace, so
stop using vfs_read in send.  This is actually better for us since we can avoid
all the extra logic of holding the file we're sending open and making sure to
clean it up.  This will fix people who have been hitting too many files open
errors when trying to send.  Thanks,

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>
</feed>
