提交 a5bd968a 编写于 作者: M Mike Snitzer 提交者: Alasdair G Kergon

dm block manager: reinstate message when validator fails

Reinstate a useful error message when the block manager buffer validator fails.
This was mistakenly eliminated when the block manager was converted to use
dm-bufio.
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 3a0f9aae
...@@ -428,8 +428,11 @@ static int dm_bm_validate_buffer(struct dm_block_manager *bm, ...@@ -428,8 +428,11 @@ static int dm_bm_validate_buffer(struct dm_block_manager *bm,
if (!v) if (!v)
return 0; return 0;
r = v->check(v, (struct dm_block *) buf, dm_bufio_get_block_size(bm->bufio)); r = v->check(v, (struct dm_block *) buf, dm_bufio_get_block_size(bm->bufio));
if (unlikely(r)) if (unlikely(r)) {
DMERR("%s validator check failed for block %llu", v->name,
(unsigned long long) dm_bufio_get_block_number(buf));
return r; return r;
}
aux->validator = v; aux->validator = v;
} else { } else {
if (unlikely(aux->validator != v)) { if (unlikely(aux->validator != v)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册