[lvc-project] [PATCH 2/2] ocfs2: validate cl_bpc in allocator inodes to prevent divide-by-zero
Deepanshu Kartikey
kartikey406 at gmail.com
Thu Oct 30 06:55:12 MSK 2025
Hi Joseph,
Thank you for identifying this! You're absolutely right.
I see now that cluster bitmap allocators (like global_bitmap at inode 23)
are intentionally set to cl_bpc=1 by mkfs.ocfs2, as they track clusters
rather than blocks.
I need to update my validation to skip cluster bitmap allocators.
Looking at the code, I'm considering something like:
if (le32_to_cpu(di->i_flags) & OCFS2_CLUSTER_FL) {
// This is a cluster bitmap, cl_bpc=1 is correct by design
goto skip_bpc_check;
}
However, I want to confirm: is OCFS2_CLUSTER_FL the correct flag to check,
or should I use a different method to identify cluster bitmap allocators
versus inode allocators?
Thanks,
Deepanshu
More information about the lvc-project
mailing list