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

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