mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-27 00:22:22 +00:00
btrfs-progs: unify size of btrfs_super_block and BTRFS_SUPER_INFO_SIZE
Just like kernel change, pad struct btrfs_super_block to 4096 bytes. As ctree.h is part of public headers, use raw number for the superblock offset. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
c0c307c313
commit
76f1a2ed57
@ -410,6 +410,9 @@ struct btrfs_root_backup {
|
||||
u8 unused_8[10];
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
#define BTRFS_SUPER_INFO_OFFSET (65536)
|
||||
#define BTRFS_SUPER_INFO_SIZE (4096)
|
||||
|
||||
/*
|
||||
* the super block basically lists the main trees of the FS
|
||||
* it currently lacks any block count etc etc
|
||||
@ -460,7 +463,10 @@ struct btrfs_super_block {
|
||||
__le64 reserved[28];
|
||||
u8 sys_chunk_array[BTRFS_SYSTEM_CHUNK_ARRAY_SIZE];
|
||||
struct btrfs_root_backup super_roots[BTRFS_NUM_BACKUP_ROOTS];
|
||||
/* Padded to 4096 bytes */
|
||||
u8 padding[565];
|
||||
} __attribute__ ((__packed__));
|
||||
BUILD_ASSERT(sizeof(struct btrfs_super_block) == BTRFS_SUPER_INFO_SIZE);
|
||||
|
||||
/*
|
||||
* Compat flags that we support. If any incompat flags are set other than the
|
||||
|
@ -23,9 +23,6 @@
|
||||
#include "kernel-shared/ctree.h"
|
||||
#include "kernel-lib/sizes.h"
|
||||
|
||||
#define BTRFS_SUPER_INFO_OFFSET SZ_64K
|
||||
#define BTRFS_SUPER_INFO_SIZE 4096
|
||||
|
||||
#define BTRFS_SUPER_MIRROR_MAX 3
|
||||
#define BTRFS_SUPER_MIRROR_SHIFT 12
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user