diff options
author | Joe Thornber <ejt@redhat.com> | 2016-03-10 19:20:58 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2016-03-11 01:12:12 +0300 |
commit | d14fcf3dd79c0b8a8d0ba469c44a6b04f3a1403b (patch) | |
tree | 077898b2913e1b3d330317129ac91015d01bff12 /drivers/md/dm-cache-metadata.h | |
parent | 3f0680402c2d0da58a8b06f7e55d387591b55e61 (diff) | |
download | linux-d14fcf3dd79c0b8a8d0ba469c44a6b04f3a1403b.tar.xz |
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.h | 4 |
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); |