[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TAKE - remove a potential mechanism for out of order log callbacks



Do not release the last iclog of a transaction before we get our
callbacks attached to it. Otherwise we can end up executing the
callback out of order.

This was found by code inspection, not sure it was ever seen
in the wild on linux, but it does explain some Irix crashes
which have been reported.


Date:  Fri Jan 24 12:15:45 PST 2003
Workarea:  jen.americas.sgi.com:/src/lord/xfs-linux.2.4

The following file(s) were checked into:
  bonnie.engr.sgi.com:/isms/slinx/2.4.x-xfs


Modid:  2.4.x-xfs:slinx:137750a
linux/fs/xfs/xfs_log.h - 1.63
	- changes in prototypes

linux/fs/xfs/xfs_log.c - 1.263
	- when writing a commit record into the log, do not release the iclog, but
	  pass it back to the caller so that they can release it after they have
	  attached their callbacks to it. xlog_state_lsn_is_synced goes away
	  because it was used in the path where we were racing between the write
	  of the iclog and the attachment of the callbacks.

linux/fs/xfs/xfs_trans.c - 1.139
	- when committing a transaction the log code passes us back a handle to
	  the iclog with our commit record in it. We pass this into xfs_log_notify
	  so that we can attach callbacks to it prior to dropping our hold in it.