diff options
author | Yan Zheng <zheng.yan@oracle.com> | 2008-10-30 21:20:02 +0300 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-10-30 21:20:02 +0300 |
commit | 80ff385665b7fca29fefe358a60ab0d09f9b8e87 (patch) | |
tree | 8a801d3f268d289b62f8dac87df8b757fb3b19d4 /fs/btrfs/transaction.c | |
parent | 6643558db29006825dbb10012b3f8890aca4bcd5 (diff) | |
download | linux-80ff385665b7fca29fefe358a60ab0d09f9b8e87.tar.xz |
Btrfs: update nodatacow code v2
This patch simplifies the nodatacow checker. If all references
were created after the latest snapshot, then we can avoid COW
safely. This patch also updates run_delalloc_nocow to do more
fine-grained checking.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 968b84f17a19..e72a013d24bf 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -763,6 +763,8 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, if (ret) goto fail; + btrfs_record_root_in_trans(root); + btrfs_set_root_last_snapshot(&root->root_item, trans->transid); memcpy(new_root_item, &root->root_item, sizeof(*new_root_item)); key.objectid = objectid; |