]> asedeno.scripts.mit.edu Git - linux.git/commit
xfs: refactor xlog_cil_insert_items() to facilitate transaction dump
authorBrian Foster <bfoster@redhat.com>
Thu, 15 Jun 2017 04:29:49 +0000 (21:29 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 19 Jun 2017 15:59:10 +0000 (08:59 -0700)
commite2f2342639a414b60de3876a8b437eac2b795dbe
tree4ba5324aef034efc3777136c67fee392208cd25c
parent7d2d5653460443e0586bd7d2e07811b4f4095e36
xfs: refactor xlog_cil_insert_items() to facilitate transaction dump

Transaction reservation overrun detection currently occurs too late
to print useful information about the offending transaction.
Ideally, the transaction data is printed before the associated log
items are moved from the transaction to the CIL, which occurs in
xlog_cil_insert_items(), such that details of the items logged by
the transaction are available for analysis.

Refactor xlog_cil_insert_items() to facilitate moving tx overrun
detection to this function. Update the function to track each bit of
extra log reservation stolen from the transaction (i.e., such as for
the CIL context ticket) and perform the log item migration as the
last operation before the CIL lock is released. This creates a
context where the transaction reservation consumption has been fully
calculated when the log items are moved to the CIL. This patch makes
no functional changes.

Signed-off-by: Brian Foster <bfoster@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_cil.c