diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-19 07:51:35 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-19 07:51:35 +0100 |
commit | 07749061b837a1268146dc8a620a522253cea877 (patch) | |
tree | 3708ac3f1a088869daf7e9826bc4b56abfcdac74 /fs/bcachefs/bcachefs.h | |
parent | 5c0941c55e5f681ffb05f395222ac673460bb3d0 (diff) | |
parent | b401b621758e46812da61fa58a67c3fd8d91de0d (diff) | |
download | linux-stable-07749061b837a1268146dc8a620a522253cea877.tar.gz linux-stable-07749061b837a1268146dc8a620a522253cea877.tar.bz2 linux-stable-07749061b837a1268146dc8a620a522253cea877.zip |
Merge 6.8-rc5 into driver-core-next
We need the driver core changes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/bcachefs/bcachefs.h')
-rw-r--r-- | fs/bcachefs/bcachefs.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h index b80c6c9efd8c..69d0d60d50e3 100644 --- a/fs/bcachefs/bcachefs.h +++ b/fs/bcachefs/bcachefs.h @@ -1249,6 +1249,18 @@ static inline struct stdio_redirect *bch2_fs_stdio_redirect(struct bch_fs *c) return stdio; } +static inline unsigned metadata_replicas_required(struct bch_fs *c) +{ + return min(c->opts.metadata_replicas, + c->opts.metadata_replicas_required); +} + +static inline unsigned data_replicas_required(struct bch_fs *c) +{ + return min(c->opts.data_replicas, + c->opts.data_replicas_required); +} + #define BKEY_PADDED_ONSTACK(key, pad) \ struct { struct bkey_i key; __u64 key ## _pad[pad]; } |