Page MenuHomeFreeBSD

vfs: flatten vop vectors
ClosedPublic

Authored by mjg on Dec 9 2019, 7:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 8 2024, 5:39 PM
Unknown Object (File)
Mar 3 2024, 2:19 PM
Unknown Object (File)
Dec 20 2023, 3:19 AM
Unknown Object (File)
Dec 10 2023, 1:14 PM
Unknown Object (File)
Nov 11 2023, 11:46 PM
Unknown Object (File)
Sep 29 2023, 6:25 AM
Unknown Object (File)
Sep 20 2023, 12:58 PM
Unknown Object (File)
Aug 24 2023, 6:43 PM

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