diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-01-08 15:46:30 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:59 -0400 |
commit | dc17ff8f11d129db9e83ab7244769e4eae05e14d (patch) | |
tree | 622e70100d6082e371a6ca62b02fd57e0c37f8dc /fs/btrfs/extent-tree.c | |
parent | e4204dedbbaa3a614605cb83cc0ac5161af6b4e6 (diff) |
Btrfs: Add data=ordered support
This forces file data extents down the disk along with the metadata that
references them. The current implementation is fairly simple, and just
writes out all of the dirty pages in an inode before the commit.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index c906bb19b211..68137cd8506a 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -1195,7 +1195,9 @@ static int pin_down_bytes(struct btrfs_root *root, u64 bytenr, u32 num_bytes, | |||
1195 | if (btrfs_buffer_uptodate(buf)) { | 1195 | if (btrfs_buffer_uptodate(buf)) { |
1196 | u64 transid = | 1196 | u64 transid = |
1197 | root->fs_info->running_transaction->transid; | 1197 | root->fs_info->running_transaction->transid; |
1198 | if (btrfs_header_generation(buf) == transid) { | 1198 | u64 header_transid = |
1199 | btrfs_header_generation(buf); | ||
1200 | if (header_transid == transid) { | ||
1199 | free_extent_buffer(buf); | 1201 | free_extent_buffer(buf); |
1200 | return 1; | 1202 | return 1; |
1201 | } | 1203 | } |