xfs
[Top] [All Lists]

Re: [PATCH 4/7] xfs: Sort delayed write buffers before dispatch

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 4/7] xfs: Sort delayed write buffers before dispatch
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 26 Jan 2010 15:13:17 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20100125120054.GE8595@xxxxxxxxxxxxx>
References: <1264400564-19704-1-git-send-email-david@xxxxxxxxxxxxx> <1264400564-19704-5-git-send-email-david@xxxxxxxxxxxxx> <20100125120054.GE8595@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Jan 25, 2010 at 07:00:54AM -0500, Christoph Hellwig wrote:
> > @@ -1937,42 +1967,46 @@ xfs_flush_buftarg(
> >     xfs_buftarg_t   *target,
> >     int             wait)
> >  {
> > -   struct list_head tmp;
> > -   xfs_buf_t       *bp, *n;
> > +   xfs_buf_t       *bp;
> >     int             pincount = 0;
> > +   LIST_HEAD(tmp_list);
> > +   LIST_HEAD(wait_list);
> >  
> >     xfs_buf_runall_queues(xfsconvertd_workqueue);
> >     xfs_buf_runall_queues(xfsdatad_workqueue);
> >     xfs_buf_runall_queues(xfslogd_workqueue);
> >  
> >     set_bit(XBT_FORCE_FLUSH, &target->bt_flags);
> > -   pincount = xfs_buf_delwri_split(target, &tmp, 0);
> > +   pincount = xfs_buf_delwri_split(target, &tmp_list, 0);
> >  
> >     /*
> > -    * Dropped the delayed write list lock, now walk the temporary list
> > +    * Dropped the delayed write list lock, now walk the temporary list.
> > +    * All I/O is issued async and then if we need to wait for completion
> > +    * we do that after issuing all the IO.
> >      */
> > -   list_for_each_entry_safe(bp, n, &tmp, b_list) {
> > +   list_sort(NULL, &tmp_list, xfs_buf_cmp);
> > +   while (!list_empty(&tmp_list)) {
> > +           struct xfs_buf *bp;
> 
> This now has a bp variable both in functionp-wide scope and a local one
> here.  Might be worth to decide for either style.

I removed the second declaration.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>