From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with SMTP id p2ALStOX123294 for ; Thu, 10 Mar 2011 15:29:06 -0600 Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id D3D8E1DE5D38 for ; Thu, 10 Mar 2011 13:31:46 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id BDQ3iq0V1J80WGLl for ; Thu, 10 Mar 2011 13:31:46 -0800 (PST) Date: Thu, 10 Mar 2011 16:31:44 -0500 From: Christoph Hellwig Subject: Re: [PATCH 6/6] xfs: push the AIL from memory reclaim and periodic sync Message-ID: <20110310213144.GA9371@infradead.org> References: <1299715529-11026-1-git-send-email-david@fromorbit.com> <1299715529-11026-7-git-send-email-david@fromorbit.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1299715529-11026-7-git-send-email-david@fromorbit.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Dave Chinner Cc: xfs@oss.sgi.com > -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. > @@ -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. _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs