bcachefs: Fix extent merging
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 25 Apr 2022 03:03:02 +0000 (23:03 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:32 +0000 (17:09 -0400)
commite320b42dfeb5797a618edbba5186060b3907ba89
treefefcb976c4d862620a3550638ffcba6d79cffd40
parentae21f74e3135efacf73d37919b5cc9ceadda7219
bcachefs: Fix extent merging

When merging extents, we have to check that we won't overflow size
fields in any CRC entries - but the check for this was wrong, because in
the loop it was in we weren't keeping a pointer to the (packed, encoded)
CRC field.

Fix this by moving it to its own loop.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/extents.c