Skip to content

Commit 4855105

Browse files
committed
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>
1 parent 629d0a8 commit 4855105

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎drivers/md/dm-cache-metadata.c‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,8 +1316,10 @@ static int __load_mapping_v1(struct dm_cache_metadata *cmd,
13161316

13171317
r = fn(context, oblock, to_cblock(cb), flags & M_DIRTY,
13181318
le32_to_cpu(hint), hints_valid);
1319-
if (r)
1320-
DMERR("policy couldn't load cblock");
1319+
if (r) {
1320+
DMERR("policy couldn't load cache block %llu",
1321+
(unsigned long long) from_cblock(to_cblock(cb)));
1322+
}
13211323
}
13221324

13231325
return r;
@@ -1355,8 +1357,10 @@ static int __load_mapping_v2(struct dm_cache_metadata *cmd,
13551357
dirty = dm_bitset_cursor_get_value(dirty_cursor);
13561358
r = fn(context, oblock, to_cblock(cb), dirty,
13571359
le32_to_cpu(hint), hints_valid);
1358-
if (r)
1359-
DMERR("policy couldn't load cblock");
1360+
if (r) {
1361+
DMERR("policy couldn't load cache block %llu",
1362+
(unsigned long long) from_cblock(to_cblock(cb)));
1363+
}
13601364
}
13611365

13621366
return r;

0 commit comments

Comments
 (0)