bcachefs: Split out disk_groups_types.h

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2023-10-22 10:58:38 -04:00
parent bf0d9e89de
commit 37707bb183
4 changed files with 20 additions and 12 deletions

View File

@ -418,6 +418,7 @@ enum bch_time_stats {
#include "buckets_types.h"
#include "buckets_waiting_for_journal_types.h"
#include "clock_types.h"
#include "disk_groups_types.h"
#include "ec_types.h"
#include "journal_types.h"
#include "keylist_types.h"

View File

@ -2,6 +2,8 @@
#ifndef _BCACHEFS_DISK_GROUPS_H
#define _BCACHEFS_DISK_GROUPS_H
#include "disk_groups_types.h"
extern const struct bch_sb_field_ops bch_sb_field_ops_disk_groups;
static inline unsigned disk_groups_nr(struct bch_sb_field_disk_groups *groups)

View File

@ -0,0 +1,17 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _BCACHEFS_DISK_GROUPS_TYPES_H
#define _BCACHEFS_DISK_GROUPS_TYPES_H
struct bch_disk_group_cpu {
bool deleted;
u16 parent;
struct bch_devs_mask devs;
};
struct bch_disk_groups_cpu {
struct rcu_head rcu;
unsigned nr;
struct bch_disk_group_cpu entries[] __counted_by(nr);
};
#endif /* _BCACHEFS_DISK_GROUPS_TYPES_H */

View File

@ -37,16 +37,4 @@ struct bch_member_cpu {
u8 valid;
};
struct bch_disk_group_cpu {
bool deleted;
u16 parent;
struct bch_devs_mask devs;
};
struct bch_disk_groups_cpu {
struct rcu_head rcu;
unsigned nr;
struct bch_disk_group_cpu entries[] __counted_by(nr);
};
#endif /* _BCACHEFS_SUPER_TYPES_H */