On Fri, Aug 26, 2011 at 09:46:56AM +1000, Dave Chinner wrote: > On Thu, Aug 25, 2011 at 03:57:19PM -0500, Alex Elder wrote: > > On Thu, 2011-08-25 at 17:17 +1000, Dave Chinner wrote: > > > +/* > > > + * Flush all the queued buffer work, then flush any remaining dirty buffers > > > + * and wait for them to complete. If there are buffers remaining on the delwri > > > + * queue, then they were pinned so couldn't be flushed. Return a value of 1 to > > > + * indicate that there were pinned buffers and the caller needs to retry the > > > + * flush. > > > + */ > > > +int > > > +xfs_flush_buftarg( > > > + xfs_buftarg_t *target, > > > + int wait) > > > > Since this function now ignores its "wait" argument, > > you could eliminate it, and perhaps get rid of the > > one (first) call in xfs_quiesce_fs() that passes 0. > > I'll leave that to a another patch. Actually, I'll re-instate the existing wait semantics here. In looking at this again I realised there is a race condition in the flushing code - if work is already in progress, then the wq flush won't start new work and hence won't see the force flag at all. So the code needs changing anyway and the only time we need to set the FORCE_FLUSH flag is when we are supposed to be waiting. Hence I'll change it back to doing a non-blocking flush when the wait flag is not set. If we want to go to just a blocking flush, then we can change everything in the one patch. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs