xfs: Account log unmount transaction correctly
authorDave Chinner <dchinner@redhat.com>
Thu, 22 Mar 2012 05:15:11 +0000 (05:15 +0000)
committerBen Myers <bpm@sgi.com>
Mon, 26 Mar 2012 22:47:24 +0000 (17:47 -0500)
commit3948659e30808fbaa7673bbe89de2ae9769e20a7
tree06ff528be9bd33a4f2579fb05514460b7fa1ec8a
parent5132ba8f2b7705fb6b06fa6ad3d009233c816b67
xfs: Account log unmount transaction correctly

There have been a few reports of this warning appearing recently:

XFS (dm-4): xlog_space_left: head behind tail
 tail_cycle = 129, tail_bytes = 20163072
 GH   cycle = 129, GH   bytes = 20162880

The common cause appears to be lots of freeze and unfreeze cycles,
and the output from the warnings indicates that we are leaking
around 8 bytes of log space per freeze/unfreeze cycle.

When we freeze the filesystem, we write an unmount record and that
uses xlog_write directly - a special type of transaction,
effectively. What it doesn't do, however, is correctly account for
the log space it uses. The unmount record writes an 8 byte structure
with a special magic number into the log, and the space this
consumes is not accounted for in the log ticket tracking the
operation. Hence we leak 8 bytes every unmount record that is
written.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_log.c
This page took 0.029225 seconds and 5 git commands to generate.