repair: fix a few message formats in process_dinode_int
PATCH 1/1 repair: fix a few message formats in process_dinode_int
Always out�ut newline after messages, and skip corruptions warnings if handling uncertain inodes.
repair/dinode.c +25 -12
@@ -2552,16 +2552,22 @@ _("bad (negative) size %" PRId64 " on inuint16_t flags =be16_to_cpu (dino->di_flags);if (flags & ~XFS_DIFLAG_ANY ) { -do_warn (_ ("Bad flags set in inode %" PRIu64), lino); +if (!uncertain) { +do_warn ( +_ ("Bad flags set in inode %" PRIu64"\n" ), + lino); + } flags &= ~XFS_DIFLAG_ANY ; }if (flags & (XFS_DIFLAG_REALTIME |XFS_DIFLAG_RTINHERIT )) {/* need an rt-dev! */ if (!rt_name) { -do_warn ( -_ ("inode %" PRIu64" has RT flag set but there is no RT device" ), - lino); +if (!uncertain) { +do_warn ( +_ ("inode %" PRIu64" has RT flag set but there is no RT device\n" ), + lino); + } flags &= ~(XFS_DIFLAG_REALTIME |XFS_DIFLAG_RTINHERIT ); }
@@ -2569,8 +2575,11 @@ _("bad (negative) size %" PRId64 " on inif (flags &XFS_DIFLAG_NEWRTBM ) {/* must be a rt bitmap inode */ if (lino != mp->m_sb.sb_rbmino) { -do_warn (_ ("inode %" PRIu64" not rt bitmap" ), - lino); +if (!uncertain) { +do_warn ( +_ ("inode %" PRIu64" not rt bitmap\n" ), + lino); + } flags &= ~XFS_DIFLAG_NEWRTBM ; } }
@@ -2580,9 +2589,11 @@ _("bad (negative) size %" PRId64 " on in XFS_DIFLAG_NOSYMLINKS)) {/* must be a directory */ if (di_mode && !S_ISDIR (di_mode)) { -do_warn ( -_ ("directory flags set on non-directory inode %" PRIu64 ), - lino); +if (!uncertain) { +do_warn ( +_ ("directory flags set on non-directory inode %" PRIu64"\n" ), + lino); + } flags &= ~(XFS_DIFLAG_RTINHERIT | XFS_DIFLAG_EXTSZINHERIT | XFS_DIFLAG_PROJINHERIT |
@@ -2592,9 +2603,11 @@ _("bad (negative) size %" PRId64 " on inif (flags & (XFS_DIFLAG_REALTIME |XFS_XFLAG_EXTSIZE )) {/* must be a file */ if (di_mode && !S_ISREG (di_mode)) { -do_warn ( -_ ("file flags set on non-file inode %" PRIu64), - lino); +if (!uncertain) { +do_warn ( +_ ("file flags set on non-file inode %" PRIu64"\n" ), + lino); + } flags &= ~(XFS_DIFLAG_REALTIME |XFS_XFLAG_EXTSIZE ); }
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
ping?
Quoted 82 lines · Christoph Hellwig
Always out�ut newline after messages, and skip corruptions warnings if handling uncertain inodes.
Signed-off-by Christoph Hellwig <[email protected]>Index:
xfsprogs-dev/repair/dinode.c
===================================================================repair/dinode.c +25
-12@@ -2552,16 +2552,22 @@ _("bad (negative) size %" PRId64 " on inuint16_t flags =be16_to_cpu (dino->di_flags);if (flags & ~XFS_DIFLAG_ANY ) { -do_warn (_ ("Bad flags set in inode %" PRIu64), lino); +if (!uncertain) { +do_warn ( +_ ("Bad flags set in inode %" PRIu64"\n" ), + lino); + } flags &= ~XFS_DIFLAG_ANY ; }if (flags & (XFS_DIFLAG_REALTIME |XFS_DIFLAG_RTINHERIT )) {/* need an rt-dev! */ if (!rt_name) { -do_warn ( -_ ("inode %" PRIu64" has RT flag set but there is no RT device" ), - lino); +if (!uncertain) { +do_warn ( +_ ("inode %" PRIu64" has RT flag set but there is no RT device\n" ), + lino); + } flags &= ~(XFS_DIFLAG_REALTIME |XFS_DIFLAG_RTINHERIT ); }@@ -2569,8 +2575,11 @@ _("bad (negative) size %" PRId64 " on inif (flags &XFS_DIFLAG_NEWRTBM ) {/* must be a rt bitmap inode */ if (lino != mp->m_sb.sb_rbmino) { -do_warn (_ ("inode %" PRIu64" not rt bitmap" ), - lino); +if (!uncertain) { +do_warn ( +_ ("inode %" PRIu64" not rt bitmap\n" ), + lino); + } flags &= ~XFS_DIFLAG_NEWRTBM ; } }@@ -2580,9 +2589,11 @@ _("bad (negative) size %" PRId64 " on in XFS_DIFLAG_NOSYMLINKS)) {/* must be a directory */ if (di_mode && !S_ISDIR (di_mode)) { -do_warn ( -_ ("directory flags set on non-directory inode %" PRIu64 ), - lino); +if (!uncertain) { +do_warn ( +_ ("directory flags set on non-directory inode %" PRIu64"\n" ), + lino); + } flags &= ~(XFS_DIFLAG_RTINHERIT | XFS_DIFLAG_EXTSZINHERIT | XFS_DIFLAG_PROJINHERIT |@@ -2592,9 +2603,11 @@ _("bad (negative) size %" PRId64 " on inif (flags & (XFS_DIFLAG_REALTIME |XFS_XFLAG_EXTSIZE )) {/* must be a file */ if (di_mode && !S_ISREG (di_mode)) { -do_warn ( -_ ("file flags set on non-file inode %" PRIu64), - lino); +if (!uncertain) { +do_warn ( +_ ("file flags set on non-file inode %" PRIu64"\n" ), + lino); + } flags &= ~(XFS_DIFLAG_REALTIME |XFS_XFLAG_EXTSIZE ); }
Quoted 4 lines
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
---end quoted text---
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 4 lines · Christoph Hellwig
Always out�ut newline after messages, and skip corruptions warnings if handling uncertain inodes.
Signed-off-by Christoph Hellwig <[email protected]>
Quoted 80 lines
Index:
xfsprogs-dev/repair/dinode.c
===================================================================repair/dinode.c +25
-12@@ -2552,16 +2552,22 @@ _("bad (negative) size %" PRId64 " on inuint16_t flags =be16_to_cpu (dino->di_flags);if (flags & ~XFS_DIFLAG_ANY ) { -do_warn (_ ("Bad flags set in inode %" PRIu64), lino); +if (!uncertain) { +do_warn ( +_ ("Bad flags set in inode %" PRIu64"\n" ), + lino); + } flags &= ~XFS_DIFLAG_ANY ; }if (flags & (XFS_DIFLAG_REALTIME |XFS_DIFLAG_RTINHERIT )) {/* need an rt-dev! */ if (!rt_name) { -do_warn ( -_ ("inode %" PRIu64" has RT flag set but there is no RT device" ), - lino); +if (!uncertain) { +do_warn ( +_ ("inode %" PRIu64" has RT flag set but there is no RT device\n" ), + lino); + } flags &= ~(XFS_DIFLAG_REALTIME |XFS_DIFLAG_RTINHERIT ); }@@ -2569,8 +2575,11 @@ _("bad (negative) size %" PRId64 " on inif (flags &XFS_DIFLAG_NEWRTBM ) {/* must be a rt bitmap inode */ if (lino != mp->m_sb.sb_rbmino) { -do_warn (_ ("inode %" PRIu64" not rt bitmap" ), - lino); +if (!uncertain) { +do_warn ( +_ ("inode %" PRIu64" not rt bitmap\n" ), + lino); + } flags &= ~XFS_DIFLAG_NEWRTBM ; } }@@ -2580,9 +2589,11 @@ _("bad (negative) size %" PRId64 " on in XFS_DIFLAG_NOSYMLINKS)) {/* must be a directory */ if (di_mode && !S_ISDIR (di_mode)) { -do_warn ( -_ ("directory flags set on non-directory inode %" PRIu64 ), - lino); +if (!uncertain) { +do_warn ( +_ ("directory flags set on non-directory inode %" PRIu64"\n" ), + lino); + } flags &= ~(XFS_DIFLAG_RTINHERIT | XFS_DIFLAG_EXTSZINHERIT | XFS_DIFLAG_PROJINHERIT |@@ -2592,9 +2603,11 @@ _("bad (negative) size %" PRId64 " on inif (flags & (XFS_DIFLAG_REALTIME |XFS_XFLAG_EXTSIZE )) {/* must be a file */ if (di_mode && !S_ISREG (di_mode)) { -do_warn ( -_ ("file flags set on non-file inode %" PRIu64), - lino); +if (!uncertain) { +do_warn ( +_ ("file flags set on non-file inode %" PRIu64"\n" ), + lino); + } flags &= ~(XFS_DIFLAG_REALTIME |XFS_XFLAG_EXTSIZE ); }
Quoted 4 lines
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs