diff options
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 43 |
1 files changed, 10 insertions, 33 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 863bfb0eb492..8a5807d2fb9d 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
@@ -374,45 +374,22 @@ writeback_single_inode(struct inode *inode, struct writeback_control *wbc) | |||
374 | if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) { | 374 | if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) { |
375 | /* | 375 | /* |
376 | * We didn't write back all the pages. nfs_writepages() | 376 | * We didn't write back all the pages. nfs_writepages() |
377 | * sometimes bales out without doing anything. Redirty | 377 | * sometimes bales out without doing anything. |
378 | * the inode; Move it from b_io onto b_more_io/b_dirty. | ||
379 | */ | 378 | */ |
380 | /* | 379 | inode->i_state |= I_DIRTY_PAGES; |
381 | * akpm: if the caller was the kupdate function we put | 380 | if (wbc->nr_to_write <= 0) { |
382 | * this inode at the head of b_dirty so it gets first | ||
383 | * consideration. Otherwise, move it to the tail, for | ||
384 | * the reasons described there. I'm not really sure | ||
385 | * how much sense this makes. Presumably I had a good | ||
386 | * reasons for doing it this way, and I'd rather not | ||
387 | * muck with it at present. | ||
388 | */ | ||
389 | if (wbc->for_kupdate) { | ||
390 | /* | 381 | /* |
391 | * For the kupdate function we move the inode | 382 | * slice used up: queue for next turn |
392 | * to b_more_io so it will get more writeout as | ||
393 | * soon as the queue becomes uncongested. | ||
394 | */ | 383 | */ |
395 | inode->i_state |= I_DIRTY_PAGES; | 384 | requeue_io(inode); |
396 | if (wbc->nr_to_write <= 0) { | ||
397 | /* | ||
398 | * slice used up: queue for next turn | ||
399 | */ | ||
400 | requeue_io(inode); | ||
401 | } else { | ||
402 | /* | ||
403 | * somehow blocked: retry later | ||
404 | */ | ||
405 | redirty_tail(inode); | ||
406 | } | ||
407 | } else { | 385 | } else { |
408 | /* | 386 | /* |
409 | * Otherwise fully redirty the inode so that | 387 | * Writeback blocked by something other than |
410 | * other inodes on this superblock will get some | 388 | * congestion. Delay the inode for some time to |
411 | * writeout. Otherwise heavy writing to one | 389 | * avoid spinning on the CPU (100% iowait) |
412 | * file would indefinitely suspend writeout of | 390 | * retrying writeback of the dirty page/inode |
413 | * all the other files. | 391 | * that cannot be performed immediately. |
414 | */ | 392 | */ |
415 | inode->i_state |= I_DIRTY_PAGES; | ||
416 | redirty_tail(inode); | 393 | redirty_tail(inode); |
417 | } | 394 | } |
418 | } else if (inode->i_state & I_DIRTY) { | 395 | } else if (inode->i_state & I_DIRTY) { |