diff options
Diffstat (limited to 'libbcachefs/buckets.h')
-rw-r--r-- | libbcachefs/buckets.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libbcachefs/buckets.h b/libbcachefs/buckets.h index d9fe938..17b82cd 100644 --- a/libbcachefs/buckets.h +++ b/libbcachefs/buckets.h @@ -174,6 +174,12 @@ void bch2_fs_usage_apply(struct bch_fs *, struct bch_fs_usage *, u64 bch2_fs_sectors_used(struct bch_fs *, struct bch_fs_usage); +static inline u64 bch2_fs_sectors_free(struct bch_fs *c, + struct bch_fs_usage stats) +{ + return c->capacity - bch2_fs_sectors_used(c, stats); +} + static inline bool is_available_bucket(struct bucket_mark mark) { return (!mark.owned_by_allocator && |