Blame SOURCES/xfsprogs-4.7.0-fix-agf-limit-errors.patch

e59f31
commit 6aa32b47197828b6d014a6faf9c7450bbc16e66f
e59f31
Author: Eric Sandeen <sandeen@redhat.com>
e59f31
Date:   Tue May 10 17:16:06 2016 +1000
e59f31
e59f31
    xfs_repair: fix agf limit error messages
e59f31
    
e59f31
    Today we see errors like:
e59f31
    
e59f31
    "fllast 118 in agf 94 too large (max = 118)"
e59f31
    
e59f31
    which makes no sense.
e59f31
    
e59f31
    If we are erroring on X >= Y, Y is clearly not the maximum allowable
e59f31
    value.
e59f31
    
e59f31
    Signed-off-by: Eric Sandeen <sandeen@redhat.com>
e59f31
    Reviewed-by: Dave Chinner <dchinner@redhat.com>
e59f31
    Signed-off-by: Dave Chinner <david@fromorbit.com>
e59f31
e59f31
Index: xfsprogs-4.5.0/repair/agheader.c
e59f31
===================================================================
e59f31
--- xfsprogs-4.5.0.orig/repair/agheader.c
e59f31
+++ xfsprogs-4.5.0/repair/agheader.c
e59f31
@@ -94,7 +94,7 @@ verify_set_agf(xfs_mount_t *mp, xfs_agf_
e59f31
 	if (be32_to_cpu(agf->agf_flfirst) >= XFS_AGFL_SIZE(mp))  {
e59f31
 		do_warn(_("flfirst %d in agf %d too large (max = %zu)\n"),
e59f31
 			be32_to_cpu(agf->agf_flfirst),
e59f31
-			i, XFS_AGFL_SIZE(mp));
e59f31
+			i, XFS_AGFL_SIZE(mp) - 1);
e59f31
 		if (!no_modify)
e59f31
 			agf->agf_flfirst = cpu_to_be32(0);
e59f31
 	}
e59f31
@@ -102,7 +102,7 @@ verify_set_agf(xfs_mount_t *mp, xfs_agf_
e59f31
 	if (be32_to_cpu(agf->agf_fllast) >= XFS_AGFL_SIZE(mp))  {
e59f31
 		do_warn(_("fllast %d in agf %d too large (max = %zu)\n"),
e59f31
 			be32_to_cpu(agf->agf_fllast),
e59f31
-			i, XFS_AGFL_SIZE(mp));
e59f31
+			i, XFS_AGFL_SIZE(mp) - 1);
e59f31
 		if (!no_modify)
e59f31
 			agf->agf_fllast = cpu_to_be32(0);
e59f31
 	}