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:
Josef Bacik 2022-11-23 17:37:33 -05:00 committed by David Sterba
parent 5324ca5ae0
commit e380421ff2
2 changed files with 3 additions and 3 deletions

View File

@ -1067,10 +1067,10 @@ void read_extent_buffer(const struct extent_buffer *eb, void *dst,
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)
{
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,

View File

@ -145,7 +145,7 @@ int memcmp_extent_buffer(const struct extent_buffer *eb, const void *ptrv,
unsigned long start, unsigned long len);
void read_extent_buffer(const struct extent_buffer *eb, void *dst,
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);
void copy_extent_buffer(struct extent_buffer *dst, struct extent_buffer *src,
unsigned long dst_offset, unsigned long src_offset,