]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: skip block reservation when fixing freelist
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 12 Dec 2018 17:42:40 +0000 (11:42 -0600)
committerEric Sandeen <sandeen@redhat.com>
Wed, 12 Dec 2018 17:42:40 +0000 (11:42 -0600)
AGFL blocks are considered to be part of the fdblocks count, so there's
no need to obtain a block reservation when fixing the AGFL as part of
repair.  Asking for a reservation can cause repair to fail if the
superblock claims zero fdblocks because we haven't gotten far enough
into phase 5 to have reset the superblock counters.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/rmap.c

index ebb5a3ad5b555a9426175a1f3d86b0ac2a93315a..c5a866468e59dbbd9a475e47a34b4555f8782178 100644 (file)
@@ -1374,8 +1374,7 @@ fix_freelist(
        args.agno = agno;
        args.alignment = 1;
        args.pag = libxfs_perag_get(mp, agno);
-       error = -libxfs_trans_alloc_rollable(mp,
-                       libxfs_alloc_min_freelist(mp, args.pag), &tp);
+       error = -libxfs_trans_alloc_rollable(mp, 0, &tp);
        if (error)
                do_error(_("failed to fix AGFL on AG %d, error %d\n"),
                                agno, error);