]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: reserve blocks for ifree transaction during log recovery
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 13 Feb 2019 19:46:16 +0000 (11:46 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 15 Feb 2019 06:42:57 +0000 (22:42 -0800)
commitd62bb3f0e3abfc4bd020af625f33034b436e542a
tree551546fb5270bde61302991d5e4db717dbb456f0
parent2eb649dcfbc4d9b6c79b82d3eda00b3e1edb0cc2
xfs: reserve blocks for ifree transaction during log recovery

Log recovery frees all the inodes stored in the unlinked list, which can
cause expansion of the free inode btree.  The ifree code skips block
reservations if it thinks there's a per-AG space reservation, but we
don't set up the reservation until after log recovery, which means that
a finobt expansion blows up in xfs_trans_mod_sb when we exceed the
transaction's block reservation.

To fix this, we set the "no finobt reservation" flag to true when we
create the xfs_mount and only set it to false if we confirm that every
AG had enough free space to put aside for the finobt.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/xfs_fsops.c
fs/xfs/xfs_super.c