summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/buckets_types.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-07-21 23:36:11 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:12 -0400
commit90541a741d74373b8cca2bcd56c469927d093064 (patch)
tree9cfaebc73ea36399eb97b0abe23c71b98756c69f /fs/bcachefs/buckets_types.h
parent3636ed489ac05e61d59be29b8e69111ef781d528 (diff)
downloadlinux-90541a741d74373b8cca2bcd56c469927d093064.tar.gz
linux-90541a741d74373b8cca2bcd56c469927d093064.tar.bz2
linux-90541a741d74373b8cca2bcd56c469927d093064.zip
bcachefs: Add new alloc fields
prep work for persistent alloc info Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/buckets_types.h')
-rw-r--r--fs/bcachefs/buckets_types.h38
1 files changed, 18 insertions, 20 deletions
diff --git a/fs/bcachefs/buckets_types.h b/fs/bcachefs/buckets_types.h
index 9f7812c69bbc..a47a7856eee4 100644
--- a/fs/bcachefs/buckets_types.h
+++ b/fs/bcachefs/buckets_types.h
@@ -9,28 +9,25 @@
struct bucket_mark {
union {
- struct {
- atomic64_t v;
- };
+ atomic64_t v;
struct {
- u8 gen;
- u8 data_type:3,
- gen_valid:1,
- owned_by_allocator:1,
- nouse:1,
- journal_seq_valid:1,
- stripe:1;
- u16 dirty_sectors;
- u16 cached_sectors;
-
- /*
- * low bits of journal sequence number when this bucket was most
- * recently modified: if journal_seq_valid is set, this bucket
- * can't be reused until the journal sequence number written to
- * disk is >= the bucket's journal sequence number:
- */
- u16 journal_seq;
+ u8 gen;
+ u8 data_type:3,
+ owned_by_allocator:1,
+ nouse:1,
+ journal_seq_valid:1,
+ stripe:1;
+ u16 dirty_sectors;
+ u16 cached_sectors;
+
+ /*
+ * low bits of journal sequence number when this bucket was most
+ * recently modified: if journal_seq_valid is set, this bucket can't be
+ * reused until the journal sequence number written to disk is >= the
+ * bucket's journal sequence number:
+ */
+ u16 journal_seq;
};
};
};
@@ -42,6 +39,7 @@ struct bucket {
};
u16 io_time[2];
+ unsigned gen_valid:1;
};
struct bucket_array {