Kent Overstreet 2a285686c1 bcache: btree locking rework
Add a new lock, b->write_lock, which is required to actually modify - or write -
a btree node; this lock is only held for short durations.

This means we can write out a btree node without taking b->lock, which _is_ held
for long durations - solving a deadlock when btree_flush_write() (from the
journalling code) is called with a btree node locked.

Right now just occurs in bch_btree_set_root(), but with an upcoming journalling
rework is going to happen a lot more.

This also turns b->lock is now more of a read/intent lock instead of a
read/write lock - but not completely, since it still blocks readers. May turn it
into a real intent lock at some point in the future.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
2014-03-18 12:23:35 -07:00
..
2014-03-18 12:23:35 -07:00
2013-03-01 22:45:51 +00:00
2013-03-01 22:45:51 +00:00
2014-01-14 23:23:03 -05:00
2013-03-01 22:45:51 +00:00
2013-11-23 22:33:47 -08:00
2013-11-09 18:20:22 -05:00
2013-08-23 09:02:13 -04:00
2013-11-23 22:33:47 -08:00
2012-07-30 17:25:16 -07:00
2013-09-05 20:46:06 -04:00
2013-11-23 22:33:47 -08:00
2013-11-23 22:33:47 -08:00
2014-01-14 23:23:04 -05:00
2007-10-20 02:01:26 +01:00
2013-11-23 22:33:56 -08:00
2013-03-01 22:45:47 +00:00
2014-01-14 23:23:04 -05:00
2013-11-23 22:33:47 -08:00
2014-01-14 23:23:04 -05:00
2013-11-23 22:33:57 -08:00
2014-01-14 23:23:04 -05:00
2014-01-20 15:49:44 -08:00
2013-11-23 22:33:47 -08:00
2013-11-23 22:33:57 -08:00
2013-11-20 13:05:25 -08:00