Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166341
b: refs/heads/master
c: b3af946
h: refs/heads/master
i:
  166339: d0913aa
v: v3
  • Loading branch information
Wu Fengguang authored and Jens Axboe committed Sep 25, 2009
1 parent d0b8aeb commit 5e7dde5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9ecc2738ac2371f88dff5d48914b4e35c45203cd
refs/heads/master: b3af9468aebf5fcb573d0a116b31d2be1d43c0e9
12 changes: 9 additions & 3 deletions trunk/fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,15 @@ writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
spin_lock(&inode_lock);
inode->i_state &= ~I_SYNC;
if (!(inode->i_state & (I_FREEING | I_CLEAR))) {
if (inode->i_state & I_DIRTY) {
if ((inode->i_state & I_DIRTY_PAGES) && wbc->for_kupdate) {
/*
* Someone redirtied the inode while were writing back
* the pages.
* More pages get dirtied by a fast dirtier.
*/
goto select_queue;
} else if (inode->i_state & I_DIRTY) {
/*
* At least XFS will redirty the inode during the
* writeback (delalloc) and on io completion (isize).
*/
redirty_tail(inode);
} else if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) {
Expand All @@ -502,6 +507,7 @@ writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
* soon as the queue becomes uncongested.
*/
inode->i_state |= I_DIRTY_PAGES;
select_queue:
if (wbc->nr_to_write <= 0) {
/*
* slice used up: queue for next turn
Expand Down

0 comments on commit 5e7dde5

Please sign in to comment.