diff options
author | Mike Snitzer <snitzer@redhat.com> | 2016-10-04 21:22:17 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2017-02-16 19:12:48 +0100 |
commit | 48551054fc256285289f6d03abd50cb74fb71819 (patch) | |
tree | f2c3c4577c97da7ec8c9ff1fe166d1c3b1bfab65 /drivers/md | |
parent | dm cache metadata: add "metadata2" feature (diff) | |
download | linux-48551054fc256285289f6d03abd50cb74fb71819.tar.xz linux-48551054fc256285289f6d03abd50cb74fb71819.zip |
dm cache metadata: name the cache block that couldn't be loaded
Improves __load_mapping_v1() and __load_mapping_v2() DMERR messages to
explicitly name the cache block number whose mapping couldn't be
loaded.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-cache-metadata.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/md/dm-cache-metadata.c b/drivers/md/dm-cache-metadata.c index 0610be7846dc..5a5ef996a26a 100644 --- a/drivers/md/dm-cache-metadata.c +++ b/drivers/md/dm-cache-metadata.c @@ -1316,8 +1316,10 @@ static int __load_mapping_v1(struct dm_cache_metadata *cmd, r = fn(context, oblock, to_cblock(cb), flags & M_DIRTY, le32_to_cpu(hint), hints_valid); - if (r) - DMERR("policy couldn't load cblock"); + if (r) { + DMERR("policy couldn't load cache block %llu", + (unsigned long long) from_cblock(to_cblock(cb))); + } } return r; @@ -1355,8 +1357,10 @@ static int __load_mapping_v2(struct dm_cache_metadata *cmd, dirty = dm_bitset_cursor_get_value(dirty_cursor); r = fn(context, oblock, to_cblock(cb), dirty, le32_to_cpu(hint), hints_valid); - if (r) - DMERR("policy couldn't load cblock"); + if (r) { + DMERR("policy couldn't load cache block %llu", + (unsigned long long) from_cblock(to_cblock(cb))); + } } return r; |