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
|