Skip to content

Commit 0d10ee2

Browse files
Josef Bacikchrismason-xx
authored andcommitted
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>
1 parent 341d14f commit 0d10ee2

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

‎fs/btrfs/extent_io.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2502,26 +2502,16 @@ int extent_write_full_page(struct extent_io_tree *tree, struct page *page,
25022502
struct writeback_control *wbc)
25032503
{
25042504
int ret;
2505-
struct address_space *mapping = page->mapping;
25062505
struct extent_page_data epd = {
25072506
.bio = NULL,
25082507
.tree = tree,
25092508
.get_extent = get_extent,
25102509
.extent_locked = 0,
25112510
.sync_io = wbc->sync_mode == WB_SYNC_ALL,
25122511
};
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-
};
25202512

25212513
ret = __extent_writepage(page, wbc, &epd);
25222514

2523-
extent_write_cache_pages(tree, mapping, &wbc_writepages,
2524-
__extent_writepage, &epd, flush_write_bio);
25252515
flush_epd_write_bio(&epd);
25262516
return ret;
25272517
}

0 commit comments

Comments
 (0)