Page MenuHomeFreeBSD

Fix makefs bootstrap after d485c77f203fb0f4cdc08dea5ff81631b51d8809

Authored by arichardson on Feb 21 2021, 12:55 PM.



The makefs msdosfs code includes fs/msdosfs/denode.h which directly uses
struct buf from <sys/buf.h> rather than the makefs struct m_buf.
To work around this problem provide a local denode.h that includes
ffs/buf.h and defines buf as an alias for m_buf.

Diff Detail

R10 FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Could you please explain suggested modification to the msdosfs headers?

I am fine with the workaround from this review, but I highly dislike direct abuse of kernel headers done in makefs(8). I did buildworld on HEAD, and run kyua test in usr.sbin/makefs. I have no idea how to detect more breakage.

BTW, I run tinderbox and make buildworld on stable/12, and it succeeded.

This revision is now accepted and ready to land.Feb 21 2021, 2:51 PM

The breakage only occurs if you build makefs as part of the bootstrap tools. I.e. you'll need LOCAL_XTOOL_DIRS="lib/libnetbsd usr.sbin/makefs" -DBOOTSTRAP_ALL_TOOLS and/or D27619 to reproduce the build failure (happening for me on 12.2).

I'll look into the changes to the msdosfs headers tomorrow to see if that's less ugly.

Possibly slightly less ugly version

This revision now requires review to proceed.Feb 22 2021, 11:01 AM

May be, instead of _KERNEL check, add #include <sys/buf.h> to consumers in sys/fs/msdosfs that lack it? Then remove this include at all.


Sounds good, let me try that.

Seems to build just fine without the sys/buf.h include

arichardson edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Feb 22 2021, 5:41 PM