projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f698a95
)
bcachefs: Fix faulty assertion
author
Kent Overstreet
<kent.overstreet@gmail.com>
Thu, 22 Aug 2019 03:52:10 +0000
(23:52 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:25 +0000
(17:08 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/buckets.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/buckets.c
b/fs/bcachefs/buckets.c
index 3d243f2d10952181a071eead6f811004f914b9d4..78d43830d0a755a232eee559aa0ced516c356b14 100644
(file)
--- a/
fs/bcachefs/buckets.c
+++ b/
fs/bcachefs/buckets.c
@@
-1483,8
+1483,6
@@
static int bch2_trans_mark_stripe_ptr(struct btree_trans *trans,
s64 parity_sectors;
int ret = 0;
- BUG_ON(!sectors);
-
ret = trans_get_key(trans, BTREE_ID_EC, POS(0, p.idx), &iter, &k);
if (ret)
return ret;
@@
-1549,6
+1547,12
@@
static int bch2_trans_mark_extent(struct btree_trans *trans,
? sectors
: ptr_disk_sectors_delta(p, offset, sectors, flags);
+ /*
+ * can happen due to rounding with compressed extents:
+ */
+ if (!disk_sectors)
+ continue;
+
ret = bch2_trans_mark_pointer(trans, p, disk_sectors,
data_type);
if (ret < 0)