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

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