Module Name: src Committed By: dholland Date: Sun Jul 18 23:56:14 UTC 2021
Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c src/sys/fs/cd9660: cd9660_vnops.c src/sys/fs/efs: efs_vnops.c src/sys/fs/hfs: hfs_vnops.c src/sys/fs/puffs: puffs_vnops.c src/sys/fs/tmpfs: tmpfs_fifoops.c tmpfs_specops.c src/sys/fs/v7fs: v7fs_extern.c src/sys/miscfs/fifofs: fifo.h src/sys/miscfs/kernfs: kernfs_vnops.c src/sys/miscfs/specfs: specdev.h src/sys/nfs: nfs_vnops.c src/sys/rump/librump/rumpvfs: rumpfs.c src/sys/ufs/chfs: chfs_vnops.c src/sys/ufs/ext2fs: ext2fs_vnops.c src/sys/ufs/ffs: ffs_vnops.c src/sys/ufs/lfs: lfs_vnops.c Log Message: Use macros for the canned parts of device and fifo vnode op tables. Add GENFS_SPECOP_ENTRIES and GENFS_FIFOOP_ENTRIES macros that contain the portion of the vnode ops table declaration that is (conservatively) the same in every fs. Use these in every fs that supports devices and/or fifos with separate ops tables. Note that ptyfs works differently (it has one type of vnode with open-coded dispatch to the specfs code, which I haven't changed in this commit) and rump/librump/rumpvfs/rumpfs.c has an indirect dynamic dispatch that already does more or less the same thing, which I also haven't changed. Also note that this anticipates a few bits in the next changeset here and there, and adds missing but unreachable calls in some cases (e.g. most fses weren't defining whiteout on devices and fifos, but it isn't reachable there), and it changes parsepath on devices and fifos to genfs_badop from genfs_parsepath (but it's not reachable there either). It appears that devices in kernfs were missing kqfilter, so it's possible that if you try to use kqueue on /kern/rootdev that it'll explode. And finally note that the ops declaration tables aren't order-dependent. (Other than vop_default_desc has to come first.) Otherwise this wouldn't work. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c cvs rdiff -u -r1.59 -r1.60 src/sys/fs/cd9660/cd9660_vnops.c cvs rdiff -u -r1.42 -r1.43 src/sys/fs/efs/efs_vnops.c cvs rdiff -u -r1.38 -r1.39 src/sys/fs/hfs/hfs_vnops.c cvs rdiff -u -r1.219 -r1.220 src/sys/fs/puffs/puffs_vnops.c cvs rdiff -u -r1.13 -r1.14 src/sys/fs/tmpfs/tmpfs_fifoops.c cvs rdiff -u -r1.14 -r1.15 src/sys/fs/tmpfs/tmpfs_specops.c cvs rdiff -u -r1.8 -r1.9 src/sys/fs/v7fs/v7fs_extern.c cvs rdiff -u -r1.26 -r1.27 src/sys/miscfs/fifofs/fifo.h cvs rdiff -u -r1.170 -r1.171 src/sys/miscfs/kernfs/kernfs_vnops.c cvs rdiff -u -r1.44 -r1.45 src/sys/miscfs/specfs/specdev.h cvs rdiff -u -r1.318 -r1.319 src/sys/nfs/nfs_vnops.c cvs rdiff -u -r1.164 -r1.165 src/sys/rump/librump/rumpvfs/rumpfs.c cvs rdiff -u -r1.44 -r1.45 src/sys/ufs/chfs/chfs_vnops.c cvs rdiff -u -r1.133 -r1.134 src/sys/ufs/ext2fs/ext2fs_vnops.c cvs rdiff -u -r1.135 -r1.136 src/sys/ufs/ffs/ffs_vnops.c cvs rdiff -u -r1.337 -r1.338 src/sys/ufs/lfs/lfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.