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, May 7, 4:16 AM
Unknown Object (File)
Sun, May 3, 7:07 PM
Unknown Object (File)
Sun, May 3, 6:53 PM
Unknown Object (File)
Sat, May 2, 10:26 PM
Unknown Object (File)
Fri, May 1, 8:38 PM
Unknown Object (File)
Thu, Apr 30, 11:18 PM
Unknown Object (File)
Mon, Apr 27, 7:55 AM
Unknown Object (File)
Sun, Apr 26, 7: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