Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v6.14-rc4 68 lines 1.2 kB view raw
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _BUCKETS_TYPES_H 3#define _BUCKETS_TYPES_H 4 5#include "bcachefs_format.h" 6#include "util.h" 7 8#define BUCKET_JOURNAL_SEQ_BITS 16 9 10struct bucket { 11 u8 lock; 12 u8 gen_valid:1; 13 u8 data_type:7; 14 u8 gen; 15 u8 stripe_redundancy; 16 u32 stripe; 17 u32 dirty_sectors; 18 u32 cached_sectors; 19 u32 stripe_sectors; 20} __aligned(sizeof(long)); 21 22struct bucket_gens { 23 struct rcu_head rcu; 24 u16 first_bucket; 25 size_t nbuckets; 26 size_t nbuckets_minus_first; 27 u8 b[] __counted_by(nbuckets); 28}; 29 30struct bch_dev_usage { 31 struct bch_dev_usage_type { 32 u64 buckets; 33 u64 sectors; /* _compressed_ sectors: */ 34 /* 35 * XXX 36 * Why do we have this? Isn't it just buckets * bucket_size - 37 * sectors? 38 */ 39 u64 fragmented; 40 } d[BCH_DATA_NR]; 41}; 42 43struct bch_fs_usage_base { 44 u64 hidden; 45 u64 btree; 46 u64 data; 47 u64 cached; 48 u64 reserved; 49 u64 nr_inodes; 50}; 51 52struct bch_fs_usage_short { 53 u64 capacity; 54 u64 used; 55 u64 free; 56 u64 nr_inodes; 57}; 58 59/* 60 * A reservation for space on disk: 61 */ 62struct disk_reservation { 63 u64 sectors; 64 u32 gen; 65 unsigned nr_replicas; 66}; 67 68#endif /* _BUCKETS_TYPES_H */