xfs: check the uniqueness of the AGFL entries
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 2 Nov 2017 22:58:36 +0000 (15:58 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 10 Nov 2017 03:27:32 +0000 (19:27 -0800)
commitd44b47fdd1c13f79a9b50a07576929f1c6c33c7f
tree3f35c3d80779536ba1109cccba016e470628826b
parent65a7935ddc9a1f0c723842776259d76394b4bd11
xfs: check the uniqueness of the AGFL entries

Make sure we don't list a block twice in the agfl by copying the
contents of the AGFL to an array, sorting it, and looking for
duplicates.  We can easily check that the number of agfl entries we see
actually matches the flcount, so do that too.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/agheader.c