提交 fba1acf9 编写于 作者: D David Sterba

btrfs: use specialized page copying helpers in btrfs_clone_extent_buffer

The copy_page is usually optimized and can be faster than memcpy.
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 d24ee97b
...@@ -4720,9 +4720,9 @@ struct extent_buffer *btrfs_clone_extent_buffer(struct extent_buffer *src) ...@@ -4720,9 +4720,9 @@ struct extent_buffer *btrfs_clone_extent_buffer(struct extent_buffer *src)
WARN_ON(PageDirty(p)); WARN_ON(PageDirty(p));
SetPageUptodate(p); SetPageUptodate(p);
new->pages[i] = p; new->pages[i] = p;
copy_page(page_address(p), page_address(src->pages[i]));
} }
copy_extent_buffer(new, src, 0, 0, src->len);
set_bit(EXTENT_BUFFER_UPTODATE, &new->bflags); set_bit(EXTENT_BUFFER_UPTODATE, &new->bflags);
set_bit(EXTENT_BUFFER_DUMMY, &new->bflags); set_bit(EXTENT_BUFFER_DUMMY, &new->bflags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册