On Sun, Sep 18, 2011 at 04:47:49PM -0400, Christoph Hellwig wrote: > Only read the LSN we need to push to with the ilock held, and then release > it before we do the log force to improve concurrency. > > This also removes the only direct caller of _xfs_trans_commit, thus > allowing it to be merged into the plain xfs_trans_commit again. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > > Index: xfs/fs/xfs/xfs_file.c > =================================================================== > --- xfs.orig/fs/xfs/xfs_file.c 2011-09-07 10:59:55.742961175 +0200 > +++ xfs/fs/xfs/xfs_file.c 2011-09-07 11:08:12.830462974 +0200 > @@ -137,6 +137,7 @@ xfs_file_fsync( > struct xfs_trans *tp; > int error = 0; > int log_flushed = 0; > + xfs_lsn_t lsn = 0; > > trace_xfs_file_fsync(ip); > > @@ -214,8 +215,10 @@ xfs_file_fsync( > */ > xfs_trans_ijoin(tp, ip); > xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); > - xfs_trans_set_sync(tp); > - error = _xfs_trans_commit(tp, 0, &log_flushed); > + error = xfs_trans_commit(tp, 0); > + > + ASSERT(xfs_ipincount(ip)); That's a racy assert. If the trans commit causes the CIL to be pushed, that could complete and unpin the inode before we start executing here again and check the pin count. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs