projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
059e413
)
bcachefs: Check for extents past eof correctly
author
Kent Overstreet
<kent.overstreet@gmail.com>
Thu, 19 Sep 2019 20:20:38 +0000
(16:20 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:27 +0000
(17:08 -0400)
bcachefs used to work mostly in terms of PAGE_SIZE, not block size at
the vfs level - but that has since been fixed.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fsck.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/fsck.c
b/fs/bcachefs/fsck.c
index e3738757b6a0cb9f81e87384f13b5a71c46cfdd1..50a7d8c1fabafc46de1d1a56d4a7ff40557d649a 100644
(file)
--- a/
fs/bcachefs/fsck.c
+++ b/
fs/bcachefs/fsck.c
@@
-509,7
+509,7
@@
retry:
if (fsck_err_on(w.have_inode &&
!(w.inode.bi_flags & BCH_INODE_I_SIZE_DIRTY) &&
k.k->type != KEY_TYPE_reservation &&
- k.k->p.offset > round_up(w.inode.bi_size,
PAGE_SIZE
) >> 9, c,
+ k.k->p.offset > round_up(w.inode.bi_size,
block_bytes(c)
) >> 9, c,
"extent type %u offset %llu past end of inode %llu, i_size %llu",
k.k->type, k.k->p.offset, k.k->p.inode, w.inode.bi_size)) {
bch2_trans_unlock(&trans);