Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242373
b: refs/heads/master
c: 78aaced
h: refs/heads/master
i:
  242371: 2bcd1d6
v: v3
  • Loading branch information
Theodore Ts'o committed Feb 26, 2011
1 parent 524b9fa commit 8ed49a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 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: ee6ecbcc5d73672217fdea420d182ecb0cdf310c
refs/heads/master: 78aaced3408141bb7c836f2db0ca435790399da5
27 changes: 10 additions & 17 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2761,6 +2761,16 @@ static int write_cache_pages_da(struct address_space *mapping,

*done_index = page->index + 1;

/*
* If we can't merge this page, and we have
* accumulated an contiguous region, write it
*/
if ((mpd->next_page != page->index) &&
(mpd->next_page != mpd->first_page)) {
mpage_da_map_and_submit(mpd);
goto ret_extent_tail;
}

lock_page(page);

/*
Expand All @@ -2784,24 +2794,7 @@ static int write_cache_pages_da(struct address_space *mapping,

BUG_ON(PageWriteback(page));

/*
* Can we merge this page to current extent?
*/
if (mpd->next_page != page->index) {
/*
* Nope, we can't. So, we map
* non-allocated blocks and start IO
* on them
*/
if (mpd->next_page != mpd->first_page) {
mpage_da_map_and_submit(mpd);
/*
* skip rest of the page in the page_vec
*/
unlock_page(page);
goto ret_extent_tail;
}

/*
* Start next extent of pages and blocks
*/
Expand Down

0 comments on commit 8ed49a2

Please sign in to comment.