bcachefs: Check for invalid btree IDs
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 17 Jun 2024 13:26:54 +0000 (09:26 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 19 Jun 2024 22:27:23 +0000 (18:27 -0400)
commit9e7cfb35e2668e542c333ed3ec4b0a951dd332ee
treed7c5f02d40f9822fa84d3d4645a6907db4aa60af
parente3fd3faa453ce4cf4b6a0f3e29ee77d5d1b243a8
bcachefs: Check for invalid btree IDs

We can only handle btree IDs up to 62, since the btree id (plus the type
for interior btree nodes) has to fit ito a 64 bit bitmask - check for
invalid ones to avoid invalid shifts later.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/recovery.c
fs/bcachefs/sb-errors_format.h