diff options
Diffstat (limited to 'libbcachefs/super-io.c')
-rw-r--r-- | libbcachefs/super-io.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libbcachefs/super-io.c b/libbcachefs/super-io.c index d2d3eba4..c9a5a7cb 100644 --- a/libbcachefs/super-io.c +++ b/libbcachefs/super-io.c @@ -261,16 +261,13 @@ struct bch_sb_field *bch2_sb_field_resize(struct bch_sb_handle *sb, /* Superblock validate: */ -static inline void __bch2_sb_layout_size_assert(void) -{ - BUILD_BUG_ON(sizeof(struct bch_sb_layout) != 512); -} - static int validate_sb_layout(struct bch_sb_layout *layout, struct printbuf *out) { u64 offset, prev_offset, max_sectors; unsigned i; + BUILD_BUG_ON(sizeof(struct bch_sb_layout) != 512); + if (!uuid_equal(&layout->magic, &BCACHE_MAGIC) && !uuid_equal(&layout->magic, &BCHFS_MAGIC)) { prt_printf(out, "Not a bcachefs superblock layout"); |