Page MenuHomeFreeBSD

vfs: flatten vop vectors
ClosedPublic

Authored by mjg on Dec 9 2019, 7:41 PM.
Tags
None
Referenced Files
F110403075: D22738.id.diff
Mon, Feb 17, 10:44 PM
Unknown Object (File)
Thu, Feb 13, 3:36 AM
Unknown Object (File)
Jan 12 2025, 9:23 AM
Unknown Object (File)
Jan 11 2025, 12:30 AM
Unknown Object (File)
Dec 9 2024, 6:55 PM
Unknown Object (File)
Dec 8 2024, 3:35 PM
Unknown Object (File)
Dec 4 2024, 11:20 AM
Unknown Object (File)
Dec 4 2024, 11:15 AM

Details

Summary

This eliminates the following loop from all VOP calls:

while(vop != NULL && \
    vop->vop_spare2 == NULL && vop->vop_bypass == NULL)
        vop = vop->vop_default;
Test Plan

will ask pho

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 28094

Event Timeline

mjg retitled this revision from vfs: flatten vector ops to vfs: flatten vop vectors.Dec 9 2019, 7:41 PM
sys/kern/vfs_default.c
149

Why do you need to 'register' this vector ?

sys/tools/vnode_if.awk
453

Do you really need this boolean ? Why not e.g. NULLify vop_default instead ? (I checked that e.g. nullfs does not use vop_default in obvious ways)

sys/ufs/ufs/ufs_vnops.c
2805

I would think that ufs vectors also do not need flattening.

sys/kern/vfs_default.c
149

For consistency with the rest. It's of no consequence for this one right now modulo surviving getnewvnode should somene pass it directly.

sys/tools/vnode_if.awk
453

I wanted to do it but vop_sigdefer walks the list and I did not want to interfere with that.

sys/ufs/ufs/ufs_vnops.c
2805

The current code is flattening stuff but I purposefully went for a more generic name to allow for whatever other stuff be useful to do in the future. If anything it is a little weird legally usable vector ops are not known upfront.

  • pull up vop_bypass the same way

pho tesetd the change, no issues

This revision is now accepted and ready to land.Dec 15 2019, 11:41 PM