Replace xlog_reserveq_wake() and xlog_writeq_wake() with xlog_grant_head_wake(), which takes a struct xlog_grant_head. On Mon, Dec 12, 2011 at 09:13:57AM -0500, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > > --- > fs/xfs/xfs_log.c | 50 ++++++++++++++++++++------------------------------ > fs/xfs/xfs_trace.h | 1 - > 2 files changed, 20 insertions(+), 31 deletions(-) > > Index: xfs/fs/xfs/xfs_log.c > =================================================================== > --- xfs.orig/fs/xfs/xfs_log.c 2011-12-11 21:31:10.580621915 +0100 > +++ xfs/fs/xfs/xfs_log.c 2011-12-11 21:32:08.763640044 +0100 > @@ -171,49 +171,39 @@ xlog_grant_head_wake_all( > spin_unlock(&head->lock); > } > > -STATIC bool > -xlog_reserveq_wake( > +static inline int > +xlog_ticket_reservation( > struct log *log, > - int *free_bytes) > + struct xlog_grant_head *head, > + struct xlog_ticket *tic) > { > - struct xlog_ticket *tic; > - int need_bytes; > - > - list_for_each_entry(tic, &log->l_reserve_head.waiters, t_queue) { > + if (head == &log->l_write_head) { Maybe it would be better to test a bit in the xlog_grant_head. You certainly have space since they are cacheline aligned... or take a bool or flag to test. Looks good. Reviewed-by: Ben Myers <bpm@xxxxxxx> _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs