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@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
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"),
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);
}