Page MenuHomeFreeBSD

Define M_UFSMNT in ffs_subr.c
AbandonedPublic

Authored by delphij on May 30 2020, 6:36 PM.
Tags
None
Referenced Files
F82003794: D25073.diff
Wed, Apr 24, 9:46 AM
Unknown Object (File)
Fri, Apr 19, 8:59 PM
Unknown Object (File)
Thu, Apr 18, 1:57 PM
Unknown Object (File)
Sun, Mar 31, 3:22 AM
Unknown Object (File)
Thu, Mar 28, 9:39 PM
Unknown Object (File)
Feb 28 2024, 4:17 PM
Unknown Object (File)
Dec 23 2023, 11:30 PM
Unknown Object (File)
Dec 23 2023, 12:10 AM
Subscribers

Details

Reviewers
mckusick
chs
Summary

Define M_UFSMNT in ffs_subr.c instead of ufs_vfsops.c.

This fixes build for kernels using GEOM_LABEL but not UFS.

Test Plan

build

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31396
Build 29020: arc lint + arc unit

Event Timeline

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.

This revision is now accepted and ready to land.Jun 24 2020, 6:22 AM

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.

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.

Per the above commentary, this change should be withdrawn.

This revision now requires changes to proceed.Jun 30 2020, 6:25 PM