]> git.itanic.dy.fi Git - linux-stable/commit
xfs: reserve blocks for ifree transaction during log recovery
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 18 Jul 2019 23:06:14 +0000 (23:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:14:28 +0000 (09:14 +0200)
commitf614ef7a34b0731cda9d382b610ff82ef264eb02
tree0f38512efcf3db4b3d6932f741f8258ab77f0231
parent424543a53ae0e4cf1d887485855ae54e774b2de2
xfs: reserve blocks for ifree transaction during log recovery

commit 15a268d9f263ed3a0601a1296568241a5a3da7aa upstream.

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>
Suggested-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/xfs/xfs_fsops.c
fs/xfs/xfs_super.c