summaryrefslogtreecommitdiff
path: root/fs/bcachefs/bcachefs.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-11-27 08:23:22 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:13 -0400
commit5663a4152138fdf23a300934128d77a1bf784237 (patch)
tree6dd75bda248deb3aab62b974a7f9dc077f342e7d /fs/bcachefs/bcachefs.h
parent73e6ab95640a7d370b7af481e8ed44be7c76b898 (diff)
downloadlinux-5663a4152138fdf23a300934128d77a1bf784237.tar.gz
linux-5663a4152138fdf23a300934128d77a1bf784237.tar.bz2
linux-5663a4152138fdf23a300934128d77a1bf784237.zip
bcachefs: refactor bch_fs_usage
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bcachefs.h')
-rw-r--r--fs/bcachefs/bcachefs.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h
index 512498c275a5..92a0ecd8fbc3 100644
--- a/fs/bcachefs/bcachefs.h
+++ b/fs/bcachefs/bcachefs.h
@@ -503,6 +503,10 @@ enum bch_fs_state {
BCH_FS_RW,
};
+struct bch_fs_pcpu {
+ u64 sectors_available;
+};
+
struct bch_fs {
struct closure cl;
@@ -615,9 +619,11 @@ struct bch_fs {
atomic64_t sectors_available;
- struct bch_fs_usage __percpu *usage[2];
+ struct bch_fs_pcpu __percpu *pcpu;
+
+ struct bch_fs_usage __percpu *usage[2];
- struct percpu_rw_semaphore mark_lock;
+ struct percpu_rw_semaphore mark_lock;
/*
* When we invalidate buckets, we use both the priority and the amount