lkml.org 
[lkml]   [2011]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@fromorbit.com


\
 
 \ /
  Last update: 2011-05-20 01:31    [W:0.094 / U:8.508 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site