]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: Fix dirty_data accounting
authorKent Overstreet <kmo@daterainc.com>
Mon, 11 Nov 2013 05:55:27 +0000 (21:55 -0800)
committerKent Overstreet <kmo@daterainc.com>
Mon, 11 Nov 2013 05:55:27 +0000 (21:55 -0800)
commit58580124007bfaeaaae6d664c27e275b8ea852e9
tree432564c5f626b36e4cb9f7b8bb5856a251717ab0
parent3e7a1193e707d08a9cb0b6a2b3ba098fd5a90c61
bcache: Fix dirty_data accounting

Dirty data accounting wasn't quite right - firstly, we were adding the key we're
inserting after it could have merged with another dirty key already in the
btree, and secondly we could sometimes pass the wrong offset to
bcache_dev_sectors_dirty_add() for dirty data we were overwriting - which is
important when tracking dirty data by stripe.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
drivers/md/bcache/btree.c