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
This commit is contained in:

committed by
Mike Snitzer

parent
7f518ad0a2
commit
b0dc3c8bc1
@@ -138,4 +138,10 @@ int lower_bound(struct btree_node *n, uint64_t key);
|
||||
|
||||
extern struct dm_block_validator btree_node_validator;
|
||||
|
||||
/*
|
||||
* Value type for upper levels of multi-level btrees.
|
||||
*/
|
||||
extern void init_le64_type(struct dm_transaction_manager *tm,
|
||||
struct dm_btree_value_type *vt);
|
||||
|
||||
#endif /* DM_BTREE_INTERNAL_H */
|
||||
|
Reference in New Issue
Block a user