aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-01-08 15:46:30 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:59 -0400
commitdc17ff8f11d129db9e83ab7244769e4eae05e14d (patch)
tree622e70100d6082e371a6ca62b02fd57e0c37f8dc /fs/btrfs/ctree.c
parente4204dedbbaa3a614605cb83cc0ac5161af6b4e6 (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/ctree.c')
-rw-r--r--fs/btrfs/ctree.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 35c57074a376..43d23148a4fe 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -221,7 +221,9 @@ int btrfs_cow_block(struct btrfs_trans_handle *trans,
221 struct extent_buffer **cow_ret) 221 struct extent_buffer **cow_ret)
222{ 222{
223 u64 search_start; 223 u64 search_start;
224 u64 header_trans;
224 int ret; 225 int ret;
226
225 if (trans->transaction != root->fs_info->running_transaction) { 227 if (trans->transaction != root->fs_info->running_transaction) {
226 printk(KERN_CRIT "trans %Lu running %Lu\n", trans->transid, 228 printk(KERN_CRIT "trans %Lu running %Lu\n", trans->transid,
227 root->fs_info->running_transaction->transid); 229 root->fs_info->running_transaction->transid);
@@ -232,7 +234,9 @@ int btrfs_cow_block(struct btrfs_trans_handle *trans,
232 root->fs_info->generation); 234 root->fs_info->generation);
233 WARN_ON(1); 235 WARN_ON(1);
234 } 236 }
235 if (btrfs_header_generation(buf) == trans->transid) { 237
238 header_trans = btrfs_header_generation(buf);
239 if (header_trans == trans->transid) {
236 *cow_ret = buf; 240 *cow_ret = buf;
237 return 0; 241 return 0;
238 } 242 }