From: Mike Snitzer <[email-masked]>

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: Mike Snitzer <[email-masked]>
Signed-off-by: Alasdair G Kergon <[email-masked]>

---
 drivers/md/persistent-data/dm-block-manager.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Index: linux/drivers/md/persistent-data/dm-block-manager.c
===================================================================
--- linux.orig/drivers/md/persistent-data/dm-block-manager.c
+++ linux/drivers/md/persistent-data/dm-block-manager.c
@@ -428,8 +428,11 @@ static int dm_bm_validate_buffer(struct 
 		if (!v)
 			return 0;
 		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;
+		}
 		aux->validator = v;
 	} else {
 		if (unlikely(aux->validator != v)) {