Skip to content

Commit 4c5eef0

Browse files
author
Kent Overstreet
committed
bcachefs: split out sb-downgrade_format.h
Signed-off-by: Kent Overstreet <[email protected]>
1 parent 016c22e commit 4c5eef0

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

fs/bcachefs/bcachefs_format.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ struct bch_sb_field {
513513
#include "snapshot_format.h"
514514
#include "subvolume_format.h"
515515
#include "sb-counters_format.h"
516+
#include "sb-downgrade_format.h"
516517
#include "sb-members_format.h"
517518

518519
enum bch_sb_field_type {
@@ -546,7 +547,6 @@ struct bch_sb_field_journal_v2 {
546547
} d[];
547548
};
548549

549-
550550
/* BCH_SB_FIELD_crypt: */
551551

552552
struct nonce {
@@ -738,18 +738,6 @@ struct bch_sb_field_ext {
738738
__le64 btrees_lost_data;
739739
};
740740

741-
struct bch_sb_field_downgrade_entry {
742-
__le16 version;
743-
__le64 recovery_passes[2];
744-
__le16 nr_errors;
745-
__le16 errors[] __counted_by(nr_errors);
746-
} __packed __aligned(2);
747-
748-
struct bch_sb_field_downgrade {
749-
struct bch_sb_field field;
750-
struct bch_sb_field_downgrade_entry entries[];
751-
};
752-
753741
/* Superblock: */
754742

755743
/*

fs/bcachefs/sb-downgrade_format.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _BCACHEFS_SB_DOWNGRADE_FORMAT_H
3+
#define _BCACHEFS_SB_DOWNGRADE_FORMAT_H
4+
5+
struct bch_sb_field_downgrade_entry {
6+
__le16 version;
7+
__le64 recovery_passes[2];
8+
__le16 nr_errors;
9+
__le16 errors[] __counted_by(nr_errors);
10+
} __packed __aligned(2);
11+
12+
struct bch_sb_field_downgrade {
13+
struct bch_sb_field field;
14+
struct bch_sb_field_downgrade_entry entries[];
15+
};
16+
17+
#endif /* _BCACHEFS_SB_DOWNGRADE_FORMAT_H */

0 commit comments

Comments
 (0)