Page MenuHomeFreeBSD

vfs: flatten vop vectors
ClosedPublic

Authored by mjg on Dec 9 2019, 7:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 13, 1:54 AM
Unknown Object (File)
Mon, Nov 3, 11:19 PM
Unknown Object (File)
Thu, Oct 30, 3:42 AM
Unknown Object (File)
Wed, Oct 29, 11:01 AM
Unknown Object (File)
Wed, Oct 29, 11:01 AM
Unknown Object (File)
Wed, Oct 29, 11:01 AM
Unknown Object (File)
Wed, Oct 29, 4:47 AM
Unknown Object (File)
Tue, Oct 28, 5:37 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