summaryrefslogtreecommitdiff
path: root/drivers/md/persistent-data/dm-space-map-disk.c
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2013-05-10 13:37:20 (GMT)
committerAlasdair G Kergon <agk@redhat.com>2013-05-10 13:37:20 (GMT)
commit7c3d3f2a87b01ff167a5f048285d5e3dee920235 (patch)
tree44b483cd78221e412b314c872cb5ddedfdfd2abe /drivers/md/persistent-data/dm-space-map-disk.c
parent24347e9595704464f62a4ed8f46abf62b4c79cdd (diff)
downloadlinux-7c3d3f2a87b01ff167a5f048285d5e3dee920235.tar.xz
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-disk.c')
-rw-r--r--drivers/md/persistent-data/dm-space-map-disk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/persistent-data/dm-space-map-disk.c b/drivers/md/persistent-data/dm-space-map-disk.c
index f6d29e6..e735a6d 100644
--- a/drivers/md/persistent-data/dm-space-map-disk.c
+++ b/drivers/md/persistent-data/dm-space-map-disk.c
@@ -248,7 +248,8 @@ static struct dm_space_map ops = {
.new_block = sm_disk_new_block,
.commit = sm_disk_commit,
.root_size = sm_disk_root_size,
- .copy_root = sm_disk_copy_root
+ .copy_root = sm_disk_copy_root,
+ .register_threshold_callback = NULL
};
struct dm_space_map *dm_sm_disk_create(struct dm_transaction_manager *tm,