Page MenuHomeFreeBSD

vfs: flatten vop vectors
ClosedPublic

Authored by mjg on Dec 9 2019, 7:41 PM.
Tags
None
Referenced Files
F175033288: D22738.id65530.diff
Wed, Oct 7, 7:03 PM
F175033272: D22738.diff
Wed, Oct 7, 7:03 PM
F175033247: D22738.id.diff
Wed, Oct 7, 7:02 PM
Unknown Object (File)
Tue, Oct 6, 9:40 PM
Unknown Object (File)
Sat, Sep 26, 7:54 AM
Unknown Object (File)
Fri, Sep 25, 2:30 PM
Unknown Object (File)
Thu, Sep 24, 4:28 PM
Unknown Object (File)
Fri, Sep 18, 8:44 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