bcachefs: is_ancestor bitmap
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 13 Jul 2023 06:43:29 +0000 (02:43 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:07 +0000 (17:10 -0400)
commit6132c84cacbff39e7b060abffc4175244347885d
treeb43cb579edb64c3a2ad66fe6d851c3c428ef6106
parent5eaa76d813d48a524a1ce040539048b851a0a20c
bcachefs: is_ancestor bitmap

Further optimization for bch2_snapshot_is_ancestor(). We add a small
inline bitmap to snapshot_t, which indicates which of the next 128
snapshot IDs are ancestors of the current id - eliminating the last few
iterations of the loop in bch2_snapshot_is_ancestor().

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