]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: factor callbacks out of xlog_state_do_callback()
authorDave Chinner <dchinner@redhat.com>
Fri, 6 Sep 2019 00:32:50 +0000 (17:32 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 6 Sep 2019 04:36:12 +0000 (21:36 -0700)
commit4871f9007fa6a878fe07b71f20957c589c85d1a3
tree92e49b99f2d7b37e929ec4cf69364e7927cd22da
parent8042a2989c4f565996fe98d956f628c2617c28d1
xfs: factor callbacks out of xlog_state_do_callback()

Simplify the code flow by lifting the iclog callback work out of
the main iclog iteration loop. This isolates the log juggling and
callbacks from the iclog state change logic in the loop.

Note that the loopdidcallbacks variable is not actually tracking
whether callbacks are actually run - it is tracking whether the
icloglock was dropped during the loop and so determines if we
completed the entire iclog scan loop atomically. Hence we know for
certain there are either no more ordered completions to run or
that the next completion will run the remaining ordered iclog
completions. Hence rename that variable appropriately for it's
function.

Signed-off-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/xfs_log.c