bcachefs: Add missing validation for jset_entry_data_usage
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 26 Nov 2023 02:42:08 +0000 (21:42 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 28 Nov 2023 22:18:24 +0000 (17:18 -0500)
commitd5bd37872a93e07ef3f9cbd4e2044ba4e17b5021
tree384c3cf27f42ae8703eae10696a1e49ee4f3a2f7
parentbbc3a46065d08f9ab3412b1f26bbfa778c444833
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>
fs/bcachefs/errcode.h
fs/bcachefs/journal_io.c
fs/bcachefs/replicas.c
fs/bcachefs/replicas.h