diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-25 21:42:08 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-28 17:18:24 -0500 |
commit | d5bd37872a93e07ef3f9cbd4e2044ba4e17b5021 (patch) | |
tree | 384c3cf27f42ae8703eae10696a1e49ee4f3a2f7 /fs/bcachefs/replicas.h | |
parent | bbc3a46065d08f9ab3412b1f26bbfa778c444833 (diff) | |
download | lwn-d5bd37872a93e07ef3f9cbd4e2044ba4e17b5021.tar.gz lwn-d5bd37872a93e07ef3f9cbd4e2044ba4e17b5021.zip |
bcachefs: Add missing validation for jset_entry_data_usage
Validation was completely missing for replicas entries in the journal
(not the superblock replicas section) - we can't have replicas entries
pointing to invalid devices.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/replicas.h')
-rw-r--r-- | fs/bcachefs/replicas.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/replicas.h b/fs/bcachefs/replicas.h index 4887675a86f0..f70a642775d1 100644 --- a/fs/bcachefs/replicas.h +++ b/fs/bcachefs/replicas.h @@ -9,6 +9,8 @@ void bch2_replicas_entry_sort(struct bch_replicas_entry *); void bch2_replicas_entry_to_text(struct printbuf *, struct bch_replicas_entry *); +int bch2_replicas_entry_validate(struct bch_replicas_entry *, + struct bch_sb *, struct printbuf *); void bch2_cpu_replicas_to_text(struct printbuf *, struct bch_replicas_cpu *); static inline struct bch_replicas_entry * |