[PATCH 6/5] xfs_repair: print better information when metadata updates fail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

If a metadata update fails during phase 6, we should print an error
message that can be traced back to a specific line of code.  Also,
res_failed spits out a general message about "xfs_trans_reserve failed",
which is probably not where the failure happened.  Fix two incorrect
call sites.

Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
---
 repair/phase6.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/repair/phase6.c b/repair/phase6.c
index 28e633de..91d208a6 100644
--- a/repair/phase6.c
+++ b/repair/phase6.c
@@ -1354,7 +1354,8 @@ longform_dir2_rebuild(
 
 	error = dir_binval(tp, ip, XFS_DATA_FORK);
 	if (error)
-		res_failed(error);
+		do_error(_("error %d invalidating directory %llu blocks\n"),
+				error, (unsigned long long)ip->i_ino);
 
 	if ((error = -libxfs_bmap_last_offset(ip, &lastblock, XFS_DATA_FORK)))
 		do_error(_("xfs_bmap_last_offset failed -- error - %d\n"),
@@ -2972,7 +2973,10 @@ process_dir_inode(
 					XFS_ILOG_CORE | XFS_ILOG_DDATA);
 				error = -libxfs_trans_commit(tp);
 				if (error)
-					res_failed(error);
+					do_error(
+_("error %d fixing shortform directory %llu\n"),
+						error,
+						(unsigned long long)ip->i_ino);
 			} else  {
 				libxfs_trans_cancel(tp);
 			}



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux