diff options
author | David Sterba <dsterba@suse.com> | 2016-11-08 18:30:31 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-11-30 13:45:17 +0100 |
commit | 58e8012cc12b3cdebea118981c4fd7136d52f2c7 (patch) | |
tree | 5cda8d4a202fc99ee64be2de43c251b4982c993e /fs/btrfs/ctree.c | |
parent | b159fa2808b1b53d784807a48ad95fa809be10b0 (diff) | |
download | op-kernel-dev-58e8012cc12b3cdebea118981c4fd7136d52f2c7.zip op-kernel-dev-58e8012cc12b3cdebea118981c4fd7136d52f2c7.tar.gz |
btrfs: add optimized version of eb to eb copy
Using copy_extent_buffer is suitable for copying betwenn buffers from an
arbitrary offset and deals with page boundaries. This is not necessary
when doing a full extent_buffer-to-extent_buffer copy. We can utilize
the copy_page helper as well.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index be362b7..25286a5 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -260,7 +260,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans, if (IS_ERR(cow)) return PTR_ERR(cow); - copy_extent_buffer(cow, buf, 0, 0, cow->len); + copy_extent_buffer_full(cow, buf); btrfs_set_header_bytenr(cow, cow->start); btrfs_set_header_generation(cow, trans->transid); btrfs_set_header_backref_rev(cow, BTRFS_MIXED_BACKREF_REV); @@ -1129,7 +1129,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans, /* cow is set to blocking by btrfs_init_new_buffer */ - copy_extent_buffer(cow, buf, 0, 0, cow->len); + copy_extent_buffer_full(cow, buf); btrfs_set_header_bytenr(cow, cow->start); btrfs_set_header_generation(cow, trans->transid); btrfs_set_header_backref_rev(cow, BTRFS_MIXED_BACKREF_REV); |