mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 12:35:52 +02:00
bcachefs: Kill fs_usage_online
More dead code deletion. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
fe5eddc0d0
commit
66a57684c6
|
|
@ -37,16 +37,6 @@ static u64 reserve_factor(u64 r)
|
|||
return r + (round_up(r, (1 << RESERVE_FACTOR)) >> RESERVE_FACTOR);
|
||||
}
|
||||
|
||||
u64 bch2_fs_sectors_used(struct bch_fs *c, struct bch_fs_usage_online *fs_usage)
|
||||
{
|
||||
return min(fs_usage->u.b.hidden +
|
||||
fs_usage->u.b.btree +
|
||||
fs_usage->u.b.data +
|
||||
reserve_factor(fs_usage->u.b.reserved +
|
||||
fs_usage->online_reserved),
|
||||
c->capacity);
|
||||
}
|
||||
|
||||
static struct bch_fs_usage_short
|
||||
__bch2_fs_usage_read_short(struct bch_fs *c)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -283,23 +283,11 @@ static inline unsigned fs_usage_u64s(struct bch_fs *c)
|
|||
return __fs_usage_u64s(READ_ONCE(c->replicas.nr));
|
||||
}
|
||||
|
||||
static inline unsigned __fs_usage_online_u64s(unsigned nr_replicas)
|
||||
{
|
||||
return sizeof(struct bch_fs_usage_online) / sizeof(u64) + nr_replicas;
|
||||
}
|
||||
|
||||
static inline unsigned fs_usage_online_u64s(struct bch_fs *c)
|
||||
{
|
||||
return __fs_usage_online_u64s(READ_ONCE(c->replicas.nr));
|
||||
}
|
||||
|
||||
static inline unsigned dev_usage_u64s(void)
|
||||
{
|
||||
return sizeof(struct bch_dev_usage) / sizeof(u64);
|
||||
}
|
||||
|
||||
u64 bch2_fs_sectors_used(struct bch_fs *, struct bch_fs_usage_online *);
|
||||
|
||||
struct bch_fs_usage_short
|
||||
bch2_fs_usage_read_short(struct bch_fs *);
|
||||
|
||||
|
|
|
|||
|
|
@ -64,11 +64,6 @@ struct bch_fs_usage {
|
|||
u64 replicas[];
|
||||
};
|
||||
|
||||
struct bch_fs_usage_online {
|
||||
u64 online_reserved;
|
||||
struct bch_fs_usage u;
|
||||
};
|
||||
|
||||
struct bch_fs_usage_short {
|
||||
u64 capacity;
|
||||
u64 used;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user