]> Git Repo - linux.git/commit
xfs: push the grant head when the log head moves forward
authorDave Chinner <[email protected]>
Fri, 6 Sep 2019 00:32:52 +0000 (17:32 -0700)
committerDarrick J. Wong <[email protected]>
Fri, 6 Sep 2019 04:36:13 +0000 (21:36 -0700)
commit14e15f1bcd738dc13dd7c1e78e4800e8bc577980
tree00359f3869504c8a9ef1ecc21744eef6df75584b
parent0383f543d8708ba0738e38c7f530f998256b8190
xfs: push the grant head when the log head moves forward

When the log fills up, we can get into the state where the
outstanding items in the CIL being committed and aggregated are
larger than the range that the reservation grant head tail pushing
will attempt to clean. This can result in the tail pushing range
being trimmed back to the the log head (l_last_sync_lsn) and so
may not actually move the push target at all.

When the iclogs associated with the CIL commit finally land, the
log head moves forward, and this removes the restriction on the AIL
push target. However, if we already have transactions sleeping on
the grant head, and there's nothing in the AIL still to flush from
the current push target, then nothing will move the tail of the log
and trigger a log reservation wakeup.

Hence the there is nothing that will trigger xlog_grant_push_ail()
to recalculate the AIL push target and start pushing on the AIL
again to write back the metadata objects that pin the tail of the
log and hence free up space and allow the transaction reservations
to be woken and make progress.

Hence we need to push on the grant head when we move the log head
forward, as this may be the only trigger we have that can move the
AIL push target forwards in this situation.

Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
fs/xfs/xfs_log.c
This page took 0.050067 seconds and 4 git commands to generate.