summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-cache-metadata.h
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2016-03-10 17:20:58 +0100
committerMike Snitzer <snitzer@redhat.com>2016-03-10 23:12:12 +0100
commitd14fcf3dd79c0b8a8d0ba469c44a6b04f3a1403b (patch)
tree077898b2913e1b3d330317129ac91015d01bff12 /drivers/md/dm-cache-metadata.h
parentdm: add missing newline between DM_DEBUG_BLOCK_STACK_TRACING and DM_BUFIO (diff)
downloadlinux-d14fcf3dd79c0b8a8d0ba469c44a6b04f3a1403b.tar.xz
linux-d14fcf3dd79c0b8a8d0ba469c44a6b04f3a1403b.zip
dm cache: make sure every metadata function checks fail_io
Otherwise operations may be attempted that will only ever go on to crash (since the metadata device is either missing or unreliable if 'fail_io' is set). 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/dm-cache-metadata.h')
-rw-r--r--drivers/md/dm-cache-metadata.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-cache-metadata.h b/drivers/md/dm-cache-metadata.h
index 2ffee21f318d..8528744195e5 100644
--- a/drivers/md/dm-cache-metadata.h
+++ b/drivers/md/dm-cache-metadata.h
@@ -66,7 +66,7 @@ void dm_cache_metadata_close(struct dm_cache_metadata *cmd);
* origin blocks to map to.
*/
int dm_cache_resize(struct dm_cache_metadata *cmd, dm_cblock_t new_cache_size);
-dm_cblock_t dm_cache_size(struct dm_cache_metadata *cmd);
+int dm_cache_size(struct dm_cache_metadata *cmd, dm_cblock_t *result);
int dm_cache_discard_bitset_resize(struct dm_cache_metadata *cmd,
sector_t discard_block_size,
@@ -137,7 +137,7 @@ int dm_cache_write_hints(struct dm_cache_metadata *cmd, struct dm_cache_policy *
*/
int dm_cache_metadata_all_clean(struct dm_cache_metadata *cmd, bool *result);
-bool dm_cache_metadata_needs_check(struct dm_cache_metadata *cmd);
+int dm_cache_metadata_needs_check(struct dm_cache_metadata *cmd, bool *result);
int dm_cache_metadata_set_needs_check(struct dm_cache_metadata *cmd);
void dm_cache_metadata_set_read_only(struct dm_cache_metadata *cmd);
void dm_cache_metadata_set_read_write(struct dm_cache_metadata *cmd);