Re: do_sync() and XFSQA test 182 failures....

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Lachlan McIlroy
Date: Thursday, October 30, 2008 - 9:02 pm

Dave Chinner wrote:
Logging the inode every time a file size update occured increased log
traffic by about 11% for the load that test 182 generates.

Logging the inode during inode writeout if, and only if, there are
unlogged changes (ie i_update_core is set) has a negligible impact on
log traffic or performance.

I thought I understood this problem yet your description is a lot more
detailed than I expected.  I agree with you that sync is updating
everything on disk and if it wasn't for log replay messing things up
then everything would be good.  So although the inode on disk is up to
date the history of changes to that inode in the log is missing the
last changes involving file size updates.  So when the log is replayed
the inode loses the file size update.  And it's all because of the
inode cluster buffer initialisation log entry that resets the cluster
(and all the inodes in it) so even the di_flushiter hack can't save us.

The obvious solution to me was to complete the history of the inode in
the log so if replay wants to start from scratch it will make all the
necessary changes to bring the inode to a state that matches what is
on disk.  Logging unlogged changes during sync will achieve this.

Avoiding log replay altogether is even better but that solution is
only going to work if we've run sync just before our system crashes.
If we haven't run sync before our system crashes then we'll still hit
this problem with regressing inodes but if we haven't run sync there
are no guarantees, right?

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
do_sync() and XFSQA test 182 failures...., Dave Chinner, (Thu Oct 30, 1:50 am)
Re: do_sync() and XFSQA test 182 failures...., Christoph Hellwig, (Thu Oct 30, 3:46 pm)
Re: do_sync() and XFSQA test 182 failures...., Dave Chinner, (Thu Oct 30, 5:12 pm)
Re: do_sync() and XFSQA test 182 failures...., Dave Chinner, (Thu Oct 30, 5:48 pm)
Re: do_sync() and XFSQA test 182 failures...., Lachlan McIlroy, (Thu Oct 30, 9:02 pm)
Re: do_sync() and XFSQA test 182 failures...., Dave Chinner, (Fri Oct 31, 6:06 am)
Re: do_sync() and XFSQA test 182 failures...., Christoph Hellwig, (Fri Oct 31, 1:31 pm)
Re: do_sync() and XFSQA test 182 failures...., Dave Chinner, (Fri Oct 31, 2:54 pm)
Re: do_sync() and XFSQA test 182 failures...., Christoph Hellwig, (Fri Oct 31, 3:22 pm)