btrfs-progs: make write_extent_buffer take a const eb
This is what we do in the kernel, and while we're syncing individual files we're going to have state where some callers are using a const, but progs isn't. So adjust write_extent_buffer to take a const eb in order to make this less painful. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
5324ca5ae0
commit
e380421ff2
|
@ -1067,10 +1067,10 @@ void read_extent_buffer(const struct extent_buffer *eb, void *dst,
|
||||||
memcpy(dst, eb->data + start, len);
|
memcpy(dst, eb->data + start, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
void write_extent_buffer(struct extent_buffer *eb, const void *src,
|
void write_extent_buffer(const struct extent_buffer *eb, const void *src,
|
||||||
unsigned long start, unsigned long len)
|
unsigned long start, unsigned long len)
|
||||||
{
|
{
|
||||||
memcpy(eb->data + start, src, len);
|
memcpy((void *)eb->data + start, src, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
void copy_extent_buffer(struct extent_buffer *dst, struct extent_buffer *src,
|
void copy_extent_buffer(struct extent_buffer *dst, struct extent_buffer *src,
|
||||||
|
|
|
@ -145,7 +145,7 @@ int memcmp_extent_buffer(const struct extent_buffer *eb, const void *ptrv,
|
||||||
unsigned long start, unsigned long len);
|
unsigned long start, unsigned long len);
|
||||||
void read_extent_buffer(const struct extent_buffer *eb, void *dst,
|
void read_extent_buffer(const struct extent_buffer *eb, void *dst,
|
||||||
unsigned long start, unsigned long len);
|
unsigned long start, unsigned long len);
|
||||||
void write_extent_buffer(struct extent_buffer *eb, const void *src,
|
void write_extent_buffer(const struct extent_buffer *eb, const void *src,
|
||||||
unsigned long start, unsigned long len);
|
unsigned long start, unsigned long len);
|
||||||
void copy_extent_buffer(struct extent_buffer *dst, struct extent_buffer *src,
|
void copy_extent_buffer(struct extent_buffer *dst, struct extent_buffer *src,
|
||||||
unsigned long dst_offset, unsigned long src_offset,
|
unsigned long dst_offset, unsigned long src_offset,
|
||||||
|
|
Loading…
Reference in New Issue