Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309879
b: refs/heads/master
c: 551ebb2
h: refs/heads/master
i:
  309877: 38b7419
  309875: f44f177
  309871: 64134db
v: v3
  • Loading branch information
Josef Bacik committed May 30, 2012
1 parent c23ee8b commit 2d8283e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 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: d7dbe9e7f64e72ec6548658857c5d92327a73633
refs/heads/master: 551ebb2d34304ee2abfe6b00d39ec65d5e4e8266
17 changes: 2 additions & 15 deletions trunk/fs/btrfs/ordered-data.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,19 +621,11 @@ void btrfs_wait_ordered_range(struct inode *inode, u64 start, u64 len)
if (orig_end > INT_LIMIT(loff_t))
orig_end = INT_LIMIT(loff_t);
}
again:

/* start IO across the range first to instantiate any delalloc
* extents
*/
filemap_fdatawrite_range(inode->i_mapping, start, orig_end);

/* The compression code will leave pages locked but return from
* writepage without setting the page writeback. Starting again
* with WB_SYNC_ALL will end up waiting for the IO to actually start.
*/
filemap_fdatawrite_range(inode->i_mapping, start, orig_end);

filemap_fdatawait_range(inode->i_mapping, start, orig_end);
filemap_write_and_wait_range(inode->i_mapping, start, orig_end);

end = orig_end;
found = 0;
Expand All @@ -657,11 +649,6 @@ void btrfs_wait_ordered_range(struct inode *inode, u64 start, u64 len)
break;
end--;
}
if (found || test_range_bit(&BTRFS_I(inode)->io_tree, start, orig_end,
EXTENT_DELALLOC, 0, NULL)) {
schedule_timeout(1);
goto again;
}
}

/*
Expand Down

0 comments on commit 2d8283e

Please sign in to comment.