diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-02-13 11:46:16 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-02-14 22:42:57 -0800 |
commit | 15a268d9f263ed3a0601a1296568241a5a3da7aa (patch) | |
tree | 551546fb5270bde61302991d5e4db717dbb456f0 /fs/xfs/xfs_fsops.c | |
parent | e1f6ca11381588e3ef138c10de60eeb34cb8466a (diff) | |
download | linux-15a268d9f263ed3a0601a1296568241a5a3da7aa.tar.gz linux-15a268d9f263ed3a0601a1296568241a5a3da7aa.tar.bz2 linux-15a268d9f263ed3a0601a1296568241a5a3da7aa.zip |
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>
Diffstat (limited to 'fs/xfs/xfs_fsops.c')
-rw-r--r-- | fs/xfs/xfs_fsops.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index f3ef70c542e1..584648582ba7 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c @@ -533,6 +533,7 @@ xfs_fs_reserve_ag_blocks( int error = 0; int err2; + mp->m_finobt_nores = false; for (agno = 0; agno < mp->m_sb.sb_agcount; agno++) { pag = xfs_perag_get(mp, agno); err2 = xfs_ag_resv_init(pag, NULL); |