Commit 7a920560 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: kill struct bch_replicas_cpu_entry

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 198d6700
......@@ -315,6 +315,7 @@ enum bch_time_stats {
#include "keylist_types.h"
#include "quota_types.h"
#include "rebalance_types.h"
#include "replicas_types.h"
#include "super_types.h"
/* Number of nodes btree coalesce will try to coalesce at once */
......
......@@ -1016,9 +1016,9 @@ enum bch_data_type {
};
struct bch_replicas_entry {
u8 data_type;
u8 nr;
u8 devs[];
__u8 data_type;
__u8 nr_devs;
__u8 devs[];
};
struct bch_sb_field_replicas {
......
This diff is collapsed.
......@@ -2,6 +2,8 @@
#ifndef _BCACHEFS_REPLICAS_H
#define _BCACHEFS_REPLICAS_H
#include "replicas_types.h"
bool bch2_replicas_marked(struct bch_fs *, enum bch_data_type,
struct bch_devs_list);
bool bch2_bkey_replicas_marked(struct bch_fs *, enum bch_data_type,
......@@ -34,11 +36,11 @@ int bch2_replicas_gc_start(struct bch_fs *, unsigned);
/* iterate over superblock replicas - used by userspace tools: */
static inline struct bch_replicas_entry *
replicas_entry_next(struct bch_replicas_entry *i)
{
return (void *) i + offsetof(struct bch_replicas_entry, devs) + i->nr;
}
#define replicas_entry_bytes(_i) \
(offsetof(typeof(*(_i)), devs) + (_i)->nr_devs)
#define replicas_entry_next(_i) \
((typeof(_i)) ((void *) (_i) + replicas_entry_bytes(_i)))
#define for_each_replicas_entry(_r, _i) \
for (_i = (_r)->entries; \
......
#ifndef _BCACHEFS_REPLICAS_TYPES_H
#define _BCACHEFS_REPLICAS_TYPES_H
struct bch_replicas_cpu {
struct rcu_head rcu;
unsigned nr;
unsigned entry_size;
struct bch_replicas_entry entries[];
};
#endif /* _BCACHEFS_REPLICAS_TYPES_H */
......@@ -36,18 +36,6 @@ struct bch_member_cpu {
u8 valid;
};
struct bch_replicas_cpu_entry {
u8 data_type;
u8 devs[BCH_SB_MEMBERS_MAX / 8];
};
struct bch_replicas_cpu {
struct rcu_head rcu;
unsigned nr;
unsigned entry_size;
struct bch_replicas_cpu_entry entries[];
};
struct bch_disk_group_cpu {
bool deleted;
u16 parent;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment