Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165884
b: refs/heads/master
c: a97adc9
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Sep 11, 2009
1 parent daefc84 commit 4089689
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 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: 4f878e8475a465ddbd951e06a23317303f1b5b30
refs/heads/master: a97adc9fffb1707da4e97f91c801660c6be92aac
14 changes: 9 additions & 5 deletions trunk/fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2135,6 +2135,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
delalloc_end = 0;
page_started = 0;
if (!epd->extent_locked) {
u64 delalloc_to_write;
/*
* make sure the wbc mapping index is at least updated
* to this page.
Expand All @@ -2154,6 +2155,14 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
tree->ops->fill_delalloc(inode, page, delalloc_start,
delalloc_end, &page_started,
&nr_written);
delalloc_to_write = (delalloc_end -
max_t(u64, page_offset(page),
delalloc_start) + 1) >>
PAGE_CACHE_SHIFT;
if (wbc->nr_to_write < delalloc_to_write) {
wbc->nr_to_write = min_t(long, 8192,
delalloc_to_write);
}
delalloc_start = delalloc_end + 1;
}

Expand Down Expand Up @@ -2350,7 +2359,6 @@ static int extent_write_cache_pages(struct extent_io_tree *tree,
writepage_t writepage, void *data,
void (*flush_fn)(void *))
{
struct backing_dev_info *bdi = mapping->backing_dev_info;
int ret = 0;
int done = 0;
struct pagevec pvec;
Expand Down Expand Up @@ -2425,10 +2433,6 @@ static int extent_write_cache_pages(struct extent_io_tree *tree,
}
if (ret || wbc->nr_to_write <= 0)
done = 1;
if (wbc->nonblocking && bdi_write_congested(bdi)) {
wbc->encountered_congestion = 1;
done = 1;
}
}
pagevec_release(&pvec);
cond_resched();
Expand Down

0 comments on commit 4089689

Please sign in to comment.