Re: [PATCH v3] hfs: port HFS+ b-tree bitmap corruption check

From: Aditya Prakash Srivastava

Date: Mon Jul 13 2026 - 22:58:23 EST


On Tue, Jul 14, 2026 at 4:43 AM Viacheslav Dubeyko <slava@xxxxxxxxxxx> wrote:
>
> Currently, the hfs_bmap_test_bit() is called only in one place. I don't
> think that it makes sense to declare it in fs/hfs/btree.h. Why have you
> decided to place this function declaration here?
>
> Thanks,
> Slava.
>

Hi Slava,

I originally declared hfs_bmap_test_bit() in fs/hfs/btree.h to
maintain API symmetry with HFS+ (where it is declared in
hfsplus_fs.h).

However, you are absolutely correct. Since hfs_bmap_test_bit() is
only called within fs/hfs/btree.c, there is no need to expose it
globally. Keeping it static inside btree.c is much cleaner and
avoids unnecessary header pollution.

I will remove the declaration from btree.h, mark
hfs_bmap_test_bit() as static in btree.c, and submit a v4 shortly.

Thank you for the review and the valuable feedback!

Best regards,
Aditya