projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
044c8c9
)
bcachefs: Allow shorter JSET_ENTRY_dev_usage entries
author
Kent Overstreet
<kent.overstreet@gmail.com>
Sat, 12 Jun 2021 21:20:02 +0000
(17:20 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:06 +0000
(17:09 -0400)
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>
fs/bcachefs/journal_io.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/journal_io.c
b/fs/bcachefs/journal_io.c
index
a7d0865
..
e797d63
100644
(file)
--- a/
fs/bcachefs/journal_io.c
+++ b/
fs/bcachefs/journal_io.c
@@
-449,7
+449,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;