diff options
author | Joe Thornber <ejt@redhat.com> | 2015-08-12 17:12:09 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2015-08-12 17:50:37 +0300 |
commit | b0dc3c8bc157c60b1d470163882be8c13e1950af (patch) | |
tree | cce26617905afa50fd19066971f215baa4a19ca3 /drivers/md/persistent-data/dm-btree-internal.h | |
parent | 7f518ad0a212e2a6fd68630e176af1de395070a7 (diff) | |
download | linux-b0dc3c8bc157c60b1d470163882be8c13e1950af.tar.xz |
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
Diffstat (limited to 'drivers/md/persistent-data/dm-btree-internal.h')
-rw-r--r-- | drivers/md/persistent-data/dm-btree-internal.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/persistent-data/dm-btree-internal.h b/drivers/md/persistent-data/dm-btree-internal.h index bf2b80d5c470..8731b6ea026b 100644 --- a/drivers/md/persistent-data/dm-btree-internal.h +++ b/drivers/md/persistent-data/dm-btree-internal.h @@ -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 */ |