From: Joe Thornber Date: Wed, 12 Aug 2015 14:12:09 +0000 (+0100) Subject: dm btree: add ref counting ops for the leaves of top level btrees X-Git-Tag: v3.2.72~86 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a11117c7b36d53cfd18c4d211ce30a4419ee477d;p=pandora-kernel.git dm btree: add ref counting ops for the leaves of top level btrees commit b0dc3c8bc157c60b1d470163882be8c13e1950af upstream. 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 Signed-off-by: Mike Snitzer [bwh: Backported to 3.2: - Drop change to remove_one() - Remove const pointer qualifications] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed