]> git.baikalelectronics.ru Git - kernel.git/commit
dm btree: add ref counting ops for the leaves of top level btrees
authorJoe Thornber <ejt@redhat.com>
Wed, 12 Aug 2015 14:12:09 +0000 (15:12 +0100)
committerMike Snitzer <snitzer@redhat.com>
Wed, 12 Aug 2015 14:50:37 +0000 (10:50 -0400)
commitdf5e0506f0352e92e5731adb949cc5d6786d7c61
treecce26617905afa50fd19066971f215baa4a19ca3
parenteda44aba4a3026298661f4288de3398d1d39804b
dm btree: add ref counting ops for the leaves of top level btrees

When using nested btrees, the top leaves of the top levels contain
block addresses for the root of the next tree down.  If we shadow a
shared leaf node the leaf values (sub tree roots) should be incremented
accordingly.

This is only an issue if there is metadata sharing in the top levels.
Which only occurs if metadata snapshots are being used (as is possible
with dm-thinp).  And could result in a block from the thinp metadata
snap being reused early, thus corrupting the thinp metadata snap.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
drivers/md/persistent-data/dm-btree-internal.h
drivers/md/persistent-data/dm-btree-remove.c
drivers/md/persistent-data/dm-btree-spine.c
drivers/md/persistent-data/dm-btree.c