[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110519232910.GK32466@dastard>
Date: Fri, 20 May 2011 09:29:10 +1000
From: Dave Chinner <david@...morbit.com>
To: Wu Fengguang <fengguang.wu@...el.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Jan Kara <jack@...e.cz>,
Christoph Hellwig <hch@...radead.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 14/18] writeback: make writeback_control.nr_to_write
straight
On Fri, May 20, 2011 at 06:06:44AM +0800, Wu Fengguang wrote:
> : writeback_single_inode(inode, wb, &wbc);
> : work->nr_pages -= write_chunk - wbc.nr_to_write;
> : wrote += write_chunk - wbc.nr_to_write;
> : if (wbc.pages_skipped) {
> : /*
> : * writeback is not making progress due to locked
> : * buffers. Skip this inode for now.
> : */
> : redirty_tail(inode, wb);
> : - }
> : + } else if (!(inode->i_state & I_DIRTY))
> : + wrote++;
>
> It looks a bit more clean to do
>
> : wrote += write_chunk - wbc.nr_to_write;
> : + if (!(inode->i_state & I_DIRTY))
> : + wrote++;
> : if (wbc.pages_skipped) {
> : /*
> : * writeback is not making progress due to locked
> : * buffers. Skip this inode for now.
> : */
> : redirty_tail(inode, wb);
> : }
But it's still in the wrong place - such post-write inode dirty
processing is supposed to be isolated to writeback_single_inode().
Spreading it across multiple locations is not, IMO, the nicest thing
to do...
Cheers,
Dave.
--
Dave Chinner
david@...morbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists