mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-16 09:46:55 +00:00
btrfs-progs: constify and reduce csum definition table
The table won't change at runtime and the string name can be in a buffer avoiding the pointer indirection. Make one entry aligned to 16 bytes, plenty of space to store reasonably long csum names. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
3a73bc1b37
commit
cc8b28226c
4
ctree.c
4
ctree.c
@ -38,9 +38,9 @@ static int balance_node_right(struct btrfs_trans_handle *trans,
|
||||
struct extent_buffer *dst_buf,
|
||||
struct extent_buffer *src_buf);
|
||||
|
||||
static struct btrfs_csum {
|
||||
static const struct btrfs_csum {
|
||||
u16 size;
|
||||
const char *name;
|
||||
const char name[14];
|
||||
} btrfs_csums[] = {
|
||||
[BTRFS_CSUM_TYPE_CRC32] = { 4, "crc32c" },
|
||||
[BTRFS_CSUM_TYPE_XXHASH] = { 8, "xxhash64" },
|
||||
|
Loading…
Reference in New Issue
Block a user