mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-13 09:11:36 +00:00
btrfs-progs: sync memcpy_extent_buffer from the kernel
We use this in ctree.c in the kernel, so sync this helper into btrfs-progs to make sync'ing ctree.c easier. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
95efaee986
commit
cb269a492e
@ -641,6 +641,12 @@ void copy_extent_buffer(const struct extent_buffer *dst,
|
||||
memcpy((void *)dst->data + dst_offset, src->data + src_offset, len);
|
||||
}
|
||||
|
||||
void memcpy_extent_buffer(const struct extent_buffer *dst, unsigned long dst_offset,
|
||||
unsigned long src_offset, unsigned long len)
|
||||
{
|
||||
memcpy((void *)dst->data + dst_offset, dst->data + src_offset, len);
|
||||
}
|
||||
|
||||
void memmove_extent_buffer(const struct extent_buffer *dst, unsigned long dst_offset,
|
||||
unsigned long src_offset, unsigned long len)
|
||||
{
|
||||
|
@ -121,6 +121,9 @@ void copy_extent_buffer(const struct extent_buffer *dst,
|
||||
const struct extent_buffer *src,
|
||||
unsigned long dst_offset, unsigned long src_offset,
|
||||
unsigned long len);
|
||||
void memcpy_extent_buffer(const struct extent_buffer *dst,
|
||||
unsigned long dst_offset, unsigned long src_offset,
|
||||
unsigned long len);
|
||||
void memmove_extent_buffer(const struct extent_buffer *dst,
|
||||
const unsigned long dst_offset,
|
||||
unsigned long src_offset, unsigned long len);
|
||||
|
Loading…
Reference in New Issue
Block a user