xfs: fix up agi unlinked list reservations
authorBrian Foster <bfoster@redhat.com>
Mon, 8 Jan 2018 18:41:36 +0000 (10:41 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 8 Jan 2018 18:41:36 +0000 (10:41 -0800)
commite8341d9f6348640dff01d8c4a33695dc82bab5a3
treee13c4141867a7d431b0855075a61b22cc30426cf
parenta6f485908d5210a5662f7a031bd1deeb3867e466
xfs: fix up agi unlinked list reservations

The current AGI unlinked list addition and removal reservations do
not reflect the worst case log usage. An unlinked list removal can
log up to two on-disk inode clusters but only includes reservation
for one. An unlinked list addition logs the on-disk cluster but
includes reservation for an in-core inode.

Update the AGI unlinked list reservation helpers to calculate the
correct worst case reservation for the associated operations.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_trans_resv.c