From: Bob Peterson <rpete...@redhat.com>

This patch adds a log message whenever unrecoverable data block errors
are found. Otherwise the output doesn't say why it stopped processing
data, and which block had the problem.

rhbz#902920
---
 gfs2/fsck/metawalk.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
index e1a685a..4e18a7b 100644
--- a/gfs2/fsck/metawalk.c
+++ b/gfs2/fsck/metawalk.c
@@ -1322,10 +1322,15 @@ static int check_data(struct gfs2_inode *ip, struct 
metawalk_fxns *pass,
                   pass1. Therefore the individual check_data functions
                   should do a range check. */
                rc = pass->check_data(ip, metablock, block, pass->private);
+               if (!error && rc) {
+                       error = rc;
+                       log_info(_("\nUnrecoverable data block error %d on "
+                                  "block %llu (0x%llx).\n"), rc,
+                                (unsigned long long)block,
+                                (unsigned long long)block);
+               }
                if (rc < 0)
                        return rc;
-               if (!error && rc)
-                       error = rc;
                (*blks_checked)++;
        }
        return error;
-- 
1.7.11.7

Reply via email to