Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128547
b: refs/heads/master
c: 7073c8e
h: refs/heads/master
i:
  128545: 3610311
  128543: 8673ca6
v: v3
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent c7d4c95 commit 73bd26a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 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: 3e9fd94ff0028a044d55690eb0a801fd1472e3c6
refs/heads/master: 7073c8e852946274e4d50fdf072438612f9dc845
22 changes: 20 additions & 2 deletions trunk/fs/btrfs/extent_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -1825,12 +1825,18 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
if (ret)
SetPageError(page);
else {
unsigned long nr = end_index + 1;
unsigned long max_nr = end_index + 1;
set_range_writeback(tree, cur, cur + iosize - 1);
if (!PageWriteback(page)) {
printk("warning page %lu not writeback, "
"cur %llu end %llu\n", page->index,
(unsigned long long)cur,
(unsigned long long)end);
}

ret = submit_extent_page(WRITE, tree, page, sector,
iosize, page_offset, bdev,
&epd->bio, nr,
&epd->bio, max_nr,
end_bio_extent_writepage);
if (ret)
SetPageError(page);
Expand All @@ -1840,6 +1846,11 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
nr++;
}
done:
if (nr == 0) {
/* make sure the mapping tag for page dirty gets cleared */
set_page_writeback(page);
end_page_writeback(page);
}
unlock_extent(tree, start, page_end, GFP_NOFS);
unlock_page(page);
return 0;
Expand Down Expand Up @@ -2408,6 +2419,13 @@ int clear_extent_buffer_dirty(struct extent_map_tree *tree,
}
}
clear_page_dirty_for_io(page);
write_lock_irq(&page->mapping->tree_lock);
if (!PageDirty(page)) {
radix_tree_tag_clear(&page->mapping->page_tree,
page_index(page),
PAGECACHE_TAG_DIRTY);
}
write_unlock_irq(&page->mapping->tree_lock);
unlock_page(page);
}
return 0;
Expand Down

0 comments on commit 73bd26a

Please sign in to comment.