summaryrefslogtreecommitdiff
path: root/drivers/md/persistent-data/dm-space-map-metadata.c
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2013-05-10 14:37:20 +0100
committerAlasdair G Kergon <agk@redhat.com>2013-05-10 14:37:20 +0100
commit7c3d3f2a87b01ff167a5f048285d5e3dee920235 (patch)
tree44b483cd78221e412b314c872cb5ddedfdfd2abe /drivers/md/persistent-data/dm-space-map-metadata.c
parent24347e9595704464f62a4ed8f46abf62b4c79cdd (diff)
dm persistent data: add threshold callback to space map
Add a threshold callback function to the persistent data space map interface for a subsequent patch to use. dm-thin and dm-cache are interested in knowing when they're getting low on metadata or data blocks. This patch introduces a new method for registering a callback against a threshold. Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/persistent-data/dm-space-map-metadata.c')
-rw-r--r--drivers/md/persistent-data/dm-space-map-metadata.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/persistent-data/dm-space-map-metadata.c b/drivers/md/persistent-data/dm-space-map-metadata.c
index 51ca9edef444..883b465794d4 100644
--- a/drivers/md/persistent-data/dm-space-map-metadata.c
+++ b/drivers/md/persistent-data/dm-space-map-metadata.c
@@ -391,7 +391,8 @@ static struct dm_space_map ops = {
.new_block = sm_metadata_new_block,
.commit = sm_metadata_commit,
.root_size = sm_metadata_root_size,
- .copy_root = sm_metadata_copy_root
+ .copy_root = sm_metadata_copy_root,
+ .register_threshold_callback = NULL
};
/*----------------------------------------------------------------*/
@@ -513,7 +514,8 @@ static struct dm_space_map bootstrap_ops = {
.new_block = sm_bootstrap_new_block,
.commit = sm_bootstrap_commit,
.root_size = sm_bootstrap_root_size,
- .copy_root = sm_bootstrap_copy_root
+ .copy_root = sm_bootstrap_copy_root,
+ .register_threshold_callback = NULL
};
/*----------------------------------------------------------------*/