Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128831
b: refs/heads/master
c: 211f90e
h: refs/heads/master
i:
  128829: 3e20ad8
  128827: eda4bed
  128823: 94b44c2
  128815: 628a8fe
  128799: dc10fcb
  128767: b5be283
v: v3
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent c23b6f8 commit e1dab76
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 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: 3edf7d33f4edb1e4a9bb0a4c0a84d95fb4d22a09
refs/heads/master: 211f90e68b679d27fe23c5505f86d6ce62c98bae
3 changes: 2 additions & 1 deletion trunk/fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2542,7 +2542,8 @@ int try_release_extent_state(struct extent_map_tree *map,
u64 end = start + PAGE_CACHE_SIZE - 1;
int ret = 1;

if (test_range_bit(tree, start, end, EXTENT_IOBITS, 0))
if (test_range_bit(tree, start, end,
EXTENT_IOBITS | EXTENT_ORDERED, 0))
ret = 0;
else {
if ((mask & GFP_NOFS) == GFP_NOFS)
Expand Down
14 changes: 9 additions & 5 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,8 @@ printk("queueing worker to fixup page %lu %Lu\n", inode->i_ino, page_offset(page
return -EAGAIN;
}

int btrfs_writepage_end_io_hook(struct page *page, u64 start, u64 end,
struct extent_state *state, int uptodate)
static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64 end)
{
struct inode *inode = page->mapping->host;
struct btrfs_root *root = BTRFS_I(inode)->root;
struct btrfs_trans_handle *trans;
struct btrfs_ordered_extent *ordered_extent;
Expand Down Expand Up @@ -550,6 +548,12 @@ int btrfs_writepage_end_io_hook(struct page *page, u64 start, u64 end,
return 0;
}

int btrfs_writepage_end_io_hook(struct page *page, u64 start, u64 end,
struct extent_state *state, int uptodate)
{
return btrfs_finish_ordered_io(page->mapping->host, start, end);
}

int btrfs_readpage_io_hook(struct page *page, u64 start, u64 end)
{
int ret = 0;
Expand Down Expand Up @@ -2663,8 +2667,8 @@ static void btrfs_invalidatepage(struct page *page, unsigned long offset)
clear_extent_bit(tree, page_start, page_end,
EXTENT_DIRTY | EXTENT_DELALLOC |
EXTENT_LOCKED, 1, 0, GFP_NOFS);
btrfs_writepage_end_io_hook(page, page_start,
page_end, NULL, 1);
btrfs_finish_ordered_io(page->mapping->host,
page_start, page_end);
btrfs_put_ordered_extent(ordered);
lock_extent(tree, page_start, page_end, GFP_NOFS);
}
Expand Down

0 comments on commit e1dab76

Please sign in to comment.