Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200216
b: refs/heads/master
c: d87815c
h: refs/heads/master
v: v3
  • Loading branch information
Dave Chinner authored and Linus Torvalds committed Jun 9, 2010
1 parent fef9f09 commit d9ee2c2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 254c8c2dbf0e06a560a5814eb90cb628adb2de66
refs/heads/master: d87815cb2090e07b0b0b2d73dc9740706e92c80c
15 changes: 15 additions & 0 deletions trunk/mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,22 @@ int write_cache_pages(struct address_space *mapping,
if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
range_whole = 1;
cycled = 1; /* ignore range_cyclic tests */

/*
* If this is a data integrity sync, cap the writeback to the
* current end of file. Any extension to the file that occurs
* after this is a new write and we don't need to write those
* pages out to fulfil our data integrity requirements. If we
* try to write them out, we can get stuck in this scan until
* the concurrent writer stops adding dirty pages and extending
* EOF.
*/
if (wbc->sync_mode == WB_SYNC_ALL &&
wbc->range_end == LLONG_MAX) {
end = i_size_read(mapping->host) >> PAGE_CACHE_SHIFT;
}
}

retry:
done_index = index;
while (!done && (index <= end)) {
Expand Down

0 comments on commit d9ee2c2

Please sign in to comment.