diff options
author | Joe Thornber <ejt@redhat.com> | 2013-05-10 09:37:21 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2013-05-10 09:37:21 -0400 |
commit | ac8c3f3df65e487bbcabf274eeeb9cd222f5da1e (patch) | |
tree | e1ab6d4662834bbbf248b1ad6224c9b7c3faa15e /drivers/md/dm-thin-metadata.h | |
parent | 2fc48021f4afdd109b9e52b6eef5db89ca80bac7 (diff) |
dm thin: generate event when metadata threshold passed
Generate a dm event when the amount of remaining thin pool metadata
space falls below a certain level.
The threshold is taken to be a quarter of the size of the metadata
device with a minimum threshold of 4MB.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-thin-metadata.h')
-rw-r--r-- | drivers/md/dm-thin-metadata.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/dm-thin-metadata.h b/drivers/md/dm-thin-metadata.h index ef8dd709e34e..845ebbe589a9 100644 --- a/drivers/md/dm-thin-metadata.h +++ b/drivers/md/dm-thin-metadata.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #define DM_THIN_METADATA_H | 8 | #define DM_THIN_METADATA_H |
9 | 9 | ||
10 | #include "persistent-data/dm-block-manager.h" | 10 | #include "persistent-data/dm-block-manager.h" |
11 | #include "persistent-data/dm-space-map.h" | ||
11 | 12 | ||
12 | #define THIN_METADATA_BLOCK_SIZE 4096 | 13 | #define THIN_METADATA_BLOCK_SIZE 4096 |
13 | 14 | ||
@@ -193,6 +194,11 @@ int dm_pool_resize_metadata_dev(struct dm_pool_metadata *pmd, dm_block_t new_siz | |||
193 | */ | 194 | */ |
194 | void dm_pool_metadata_read_only(struct dm_pool_metadata *pmd); | 195 | void dm_pool_metadata_read_only(struct dm_pool_metadata *pmd); |
195 | 196 | ||
197 | int dm_pool_register_metadata_threshold(struct dm_pool_metadata *pmd, | ||
198 | dm_block_t threshold, | ||
199 | dm_sm_threshold_fn fn, | ||
200 | void *context); | ||
201 | |||
196 | /*----------------------------------------------------------------*/ | 202 | /*----------------------------------------------------------------*/ |
197 | 203 | ||
198 | #endif | 204 | #endif |