aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-08-01 14:37:36 -0400
committerChris Mason <chris.mason@oracle.com>2011-08-01 14:37:36 -0400
commit0d10ee2e6deb5c8409ae65b970846344897d5e4e (patch)
tree7072161df34ced133b41cc99e5f868bc8e55a018 /fs
parent341d14f161a475ebdbc9adff1f7e681e1185dee9 (diff)
Btrfs: don't call writepages from within write_full_page
When doing a writepage we call writepages to try and write out any other dirty pages in the area. This could cause problems where we commit a transaction and then have somebody else dirtying metadata in the area as we could end up writing out a lot more than we care about, which could cause latency on anybody who is waiting for the transaction to completely finish committing. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent_io.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index a59ebc608ccc..8491712b1dad 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2502,7 +2502,6 @@ int extent_write_full_page(struct extent_io_tree *tree, struct page *page,
2502 struct writeback_control *wbc) 2502 struct writeback_control *wbc)
2503{ 2503{
2504 int ret; 2504 int ret;
2505 struct address_space *mapping = page->mapping;
2506 struct extent_page_data epd = { 2505 struct extent_page_data epd = {
2507 .bio = NULL, 2506 .bio = NULL,
2508 .tree = tree, 2507 .tree = tree,
@@ -2510,18 +2509,9 @@ int extent_write_full_page(struct extent_io_tree *tree, struct page *page,
2510 .extent_locked = 0, 2509 .extent_locked = 0,
2511 .sync_io = wbc->sync_mode == WB_SYNC_ALL, 2510 .sync_io = wbc->sync_mode == WB_SYNC_ALL,
2512 }; 2511 };
2513 struct writeback_control wbc_writepages = {
2514 .sync_mode = wbc->sync_mode,
2515 .older_than_this = NULL,
2516 .nr_to_write = 64,
2517 .range_start = page_offset(page) + PAGE_CACHE_SIZE,
2518 .range_end = (loff_t)-1,
2519 };
2520 2512
2521 ret = __extent_writepage(page, wbc, &epd); 2513 ret = __extent_writepage(page, wbc, &epd);
2522 2514
2523 extent_write_cache_pages(tree, mapping, &wbc_writepages,
2524 __extent_writepage, &epd, flush_write_bio);
2525 flush_epd_write_bio(&epd); 2515 flush_epd_write_bio(&epd);
2526 return ret; 2516 return ret;
2527} 2517}