summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-06-12 17:20:02 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2021-07-06 13:03:50 -0400
commite367b10f37c0b0510075c0ee10b9c8bd76280bbc (patch)
tree5dd6c9d1545b611b9e608b6e4e7dbc641436bbbc
parent9fbb15d27ec185cb3ed90ac2e8bf402079d963ad (diff)
bcachefs: Allow shorter JSET_ENTRY_dev_usage entries
If the last entry(ies) would be all zeros, there's no need to write them out - the read path already handles that. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r--fs/bcachefs/journal_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c
index 2da6839fcdc0..66a0e267b3f4 100644
--- a/fs/bcachefs/journal_io.c
+++ b/fs/bcachefs/journal_io.c
@@ -450,7 +450,7 @@ static int journal_entry_validate_dev_usage(struct bch_fs *c,
struct jset_entry_dev_usage *u =
container_of(entry, struct jset_entry_dev_usage, entry);
unsigned bytes = jset_u64s(le16_to_cpu(entry->u64s)) * sizeof(u64);
- unsigned expected = sizeof(*u) + sizeof(u->d[0]) * 7; /* Current value of BCH_DATA_NR */
+ unsigned expected = sizeof(*u);
unsigned dev;
int ret = 0;