Messages in this thread Patch in this message | | | Date | Fri, 28 Dec 2007 21:41:21 +0800 | From | Fengguang Wu <> | Subject | [PATCH 02/11] writeback: requeue_io_wait() on blocked kupdate |
| |
Convert to requeue_io_wait() for case:
kupdate cannot write all pages because of uncontrollable bad conditions.
Cc: Michael Rubin <mrubin@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn> --- fs/fs-writeback.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
--- linux-2.6.24-rc6-mm1.orig/fs/fs-writeback.c +++ linux-2.6.24-rc6-mm1/fs/fs-writeback.c @@ -292,11 +292,16 @@ __sync_single_inode(struct inode *inode, * For the kupdate function we move the inode * to s_more_io so it will get more writeout as * soon as the queue becomes uncongested. */ inode->i_state |= I_DIRTY_PAGES; - requeue_io(inode); + if (wbc->nr_to_write > 0) + /* somehow blocked: wait and retry */ + requeue_io_wait(inode); + else + /* slice used up: queue for next turn */ + requeue_io(inode); } else { /* * Otherwise fully redirty the inode so that * other inodes on this superblock will get some * writeout. Otherwise heavy writing to one --
| |