On Thu, Mar 10, 2011 at 04:31:44PM -0500, Christoph Hellwig wrote: > > -STATIC void xfs_ail_splice(struct xfs_ail *, struct list_head *, xfs_lsn_t); > > -STATIC void xfs_ail_delete(struct xfs_ail *, xfs_log_item_t *); > > -STATIC xfs_log_item_t * xfs_ail_min(struct xfs_ail *); > > -STATIC xfs_log_item_t * xfs_ail_next(struct xfs_ail *, xfs_log_item_t *); > > - > > Reordering and cleanup of unrelated existing functions should be in a > separate patch. OK. > > > @@ -55,16 +93,32 @@ xfs_lsn_t > > xfs_trans_ail_tail( > > struct xfs_ail *ailp) > > { > > - xfs_lsn_t lsn; > > + xfs_lsn_t lsn = 0; > > xfs_log_item_t *lip; > > > > spin_lock(&ailp->xa_lock); > > lip = xfs_ail_min(ailp); > > - if (lip == NULL) { > > - lsn = (xfs_lsn_t)0; > > - } else { > > + if (lip) > > + lsn = lip->li_lsn; > > + spin_unlock(&ailp->xa_lock); > > + > > + return lsn; > > +} > > + > > +/* > > + * Return the maximum lsn held in the AIL, or zero if the AIl is empty. > > + */ > > +static xfs_lsn_t > > +xfs_ail_max_lsn( > > + struct xfs_ail *ailp) > > +{ > > + xfs_lsn_t lsn = 0; > > + xfs_log_item_t *lip; > > + > > + spin_lock(&ailp->xa_lock); > > + lip = xfs_ail_max(ailp); > > + if (lip) > > As this is the counterpart to xfs_trans_ail_tail the naming for both > should be similar. I much prefer the descriptive _lsn naming over the > random trans in xfs_trans_ail_tail. Ok, will change. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs