Define M_UFSMNT in ffs_subr.c instead of ufs_vfsops.c.
This fixes build for kernels using GEOM_LABEL but not UFS.
Differential D25073
Define M_UFSMNT in ffs_subr.c delphij on May 30 2020, 6:36 PM. Authored by Tags None Referenced Files
Subscribers
Details
Diff Detail
Event TimelineComment Actions This looks like a reasonable change to me. Note that the files in the above diffs are a few revisions back from the head of the tree. Notably -r362292 moved a number of functions from ffs_subr.c to ffs_vfsops.c. But this change should still apply to the corresponding files at the head of tree. Comment Actions The intention is that ffs_subr.c should only contain functions that are shared by the ufs kernel module and the libufs userland library. At some point the geom_label kernel module started using ffs_subr.c too even though that is cross-module direct reference, which is problematic when not all of the modules are statically included in the base kernel. Now that I moved the functions which are only needed by the ufs kernel module elsewhere, geom_label's instance of ffs_subr.c no longer references M_UFSMNT, so this change is not necessary. Moving the definition of M_UFSMNT to ffs_subr.c would result in two copies of M_UFSMNT in a system where UFS is not statically included in the base kernel but loaded as a module later, and I suspect that would cause problems. Comment Actions Having read Chuck's argument, I agree with it. I was thinking that the g_label_ufs.c routines passed in M_UFSMNT as their malloc type. But they do not. They use M_GEOM malloc type. So there is no need for them to have an definition for M_UFSMNT. |