From d7db97d9f335de6ea508513fd91ef4cd9c4616e5 Mon Sep 17 00:00:00 2001 From: Pavel <68122101+red-prig@users.noreply.github.com> Date: Sat, 13 May 2023 22:32:37 +0300 Subject: [PATCH] - --- sys/fs/deadfs/dead_vnops.pas | 7 - sys/fs/devfs/devfs_vnops.pas | 14 - sys/fs/fdescfs/fdesc_vnops.pas | 7 - sys/fs/nullfs/null_vnops.pas | 44 -- sys/fs/ufs/ufs_vnops.pas | 7 - sys/vfs/vfs_default.pas | 97 ----- sys/vfs/vfs_vnops.pas | 10 +- sys/vfs/vnode.pas | 7 - sys/vfs/vnode_if.pas | 586 ++++++++------------------ tools/vop_generator/vop_generator.lpr | 11 +- 10 files changed, 185 insertions(+), 605 deletions(-) diff --git a/sys/fs/deadfs/dead_vnops.pas b/sys/fs/deadfs/dead_vnops.pas index af0e002f..70b0a586 100644 --- a/sys/fs/deadfs/dead_vnops.pas +++ b/sys/fs/deadfs/dead_vnops.pas @@ -27,7 +27,6 @@ const vop_bypass :nil; vop_islocked :nil; vop_lookup :@dead_lookup; - vop_cachedlookup :nil; vop_create :@VOP_PANIC; vop_whiteout :nil; vop_mknod :@VOP_PANIC; @@ -81,15 +80,9 @@ const vop_vptofh :nil; vop_vptocnp :@VOP_EBADF; vop_allocate :nil; - vop_advise :nil; vop_unp_bind :nil; vop_unp_connect :nil; vop_unp_detach :nil; - vop_is_text :nil; - vop_set_text :nil; - vop_unset_text :nil; - vop_get_writecount:nil; - vop_add_writecount:nil ); implementation diff --git a/sys/fs/devfs/devfs_vnops.pas b/sys/fs/devfs/devfs_vnops.pas index 5d5519ee..95f80d4c 100644 --- a/sys/fs/devfs/devfs_vnops.pas +++ b/sys/fs/devfs/devfs_vnops.pas @@ -80,7 +80,6 @@ const vop_islocked :nil; vop_lookup :@devfs_lookup; - vop_cachedlookup :nil; vop_create :nil; vop_whiteout :nil; vop_mknod :@devfs_mknod; @@ -134,15 +133,9 @@ const vop_vptofh :nil; vop_vptocnp :@devfs_vptocnp; vop_allocate :nil; - vop_advise :nil; vop_unp_bind :nil; vop_unp_connect :nil; vop_unp_detach :nil; - vop_is_text :nil; - vop_set_text :nil; - vop_unset_text :nil; - vop_get_writecount:nil; - vop_add_writecount:nil; ); devfs_specops:vop_vector=( @@ -151,7 +144,6 @@ const vop_islocked :nil; vop_lookup :nil; - vop_cachedlookup :nil; vop_create :@VOP_PANIC; vop_whiteout :nil; vop_mknod :@VOP_PANIC; @@ -205,15 +197,9 @@ const vop_vptofh :nil; vop_vptocnp :@devfs_vptocnp; vop_allocate :nil; - vop_advise :nil; vop_unp_bind :nil; vop_unp_connect :nil; vop_unp_detach :nil; - vop_is_text :nil; - vop_set_text :nil; - vop_unset_text :nil; - vop_get_writecount:nil; - vop_add_writecount:nil; ); devfs_ops_f:fileops=( diff --git a/sys/fs/fdescfs/fdesc_vnops.pas b/sys/fs/fdescfs/fdesc_vnops.pas index d9aa1c3e..81451c9a 100644 --- a/sys/fs/fdescfs/fdesc_vnops.pas +++ b/sys/fs/fdescfs/fdesc_vnops.pas @@ -30,7 +30,6 @@ const vop_islocked :nil; vop_lookup :@fdesc_lookup; - vop_cachedlookup :nil; vop_create :nil; vop_whiteout :nil; vop_mknod :nil; @@ -84,15 +83,9 @@ const vop_vptofh :nil; vop_vptocnp :nil; vop_allocate :nil; - vop_advise :nil; vop_unp_bind :nil; vop_unp_connect :nil; vop_unp_detach :nil; - vop_is_text :nil; - vop_set_text :nil; - vop_unset_text :nil; - vop_get_writecount:nil; - vop_add_writecount:nil; ); procedure fdesc_insmntque_dtr(vp:p_vnode;arg:Pointer); diff --git a/sys/fs/nullfs/null_vnops.pas b/sys/fs/nullfs/null_vnops.pas index 3c613f33..2eaf377b 100644 --- a/sys/fs/nullfs/null_vnops.pas +++ b/sys/fs/nullfs/null_vnops.pas @@ -11,7 +11,6 @@ uses vfs_default; function null_bypass(ap:p_vop_generic_args):Integer; -function null_add_writecount(ap:p_vop_add_writecount_args):Integer; function null_lookup(ap:p_vop_lookup_args):Integer; function null_open(ap:p_vop_open_args):Integer; function null_setattr(ap:p_vop_setattr_args):Integer; @@ -38,7 +37,6 @@ const vop_islocked :@vop_stdislocked; vop_lookup :@null_lookup; - vop_cachedlookup :nil; vop_create :nil; vop_whiteout :nil; vop_mknod :nil; @@ -92,15 +90,9 @@ const vop_vptofh :@null_vptofh; vop_vptocnp :@null_vptocnp; vop_allocate :nil; - vop_advise :nil; vop_unp_bind :nil; vop_unp_connect :nil; vop_unp_detach :nil; - vop_is_text :nil; - vop_set_text :nil; - vop_unset_text :nil; - vop_get_writecount:nil; - vop_add_writecount:@null_add_writecount; ); implementation @@ -266,33 +258,6 @@ _out: Exit(error); end; -function null_add_writecount(ap:p_vop_add_writecount_args):Integer; -var - lvp,vp:p_vnode; - error:Integer; -begin - vp:=ap^.a_vp; - lvp:=NULLVPTOLOWERVP(vp); - - if (lvp=nil) then - begin - Inc(ap^.a_vp^.v_writecount,ap^.a_inc); - Exit(0); - end; - - Assert(vp^.v_writecount + ap^.a_inc >= 0,'wrong writecount inc'); - if (vp^.v_writecount > 0) and (vp^.v_writecount + ap^.a_inc=0) then - error:=VOP_ADD_WRITECOUNT(lvp, -1) - else - if (vp^.v_writecount=0) and (vp^.v_writecount + ap^.a_inc > 0) then - error:=VOP_ADD_WRITECOUNT(lvp, 1) - else - error:=0; - if (error=0) then - Inc(vp^.v_writecount,ap^.a_inc); - Exit(error); -end; - { * We have to carry on the locking protocol on the null layer vnodes * as we progress through the tree. We also have to enforce read-only @@ -813,15 +778,6 @@ begin vp^.v_vnlock:=@vp^.v_lock; VI_UNLOCK(vp); - { - * If we were opened for write, we leased one write reference - * to the lower vnode. If this is a reclamation due to the - * forced unmount, undo the reference now. - } - if (vp^.v_writecount > 0) then - if (lowervp<>nil) then - VOP_ADD_WRITECOUNT(lowervp, -1); - if (lowervp<>nil) then begin if ((xp^.null_flags and NULLV_NOUNLOCK)<>0) then diff --git a/sys/fs/ufs/ufs_vnops.pas b/sys/fs/ufs/ufs_vnops.pas index 64a9df32..be9d6872 100644 --- a/sys/fs/ufs/ufs_vnops.pas +++ b/sys/fs/ufs/ufs_vnops.pas @@ -41,7 +41,6 @@ const vop_islocked :nil; vop_lookup :@ufs_lookup; - vop_cachedlookup :nil; vop_create :nil; vop_whiteout :nil; vop_mknod :nil;//@devfs_mknod; @@ -95,15 +94,9 @@ const vop_vptofh :nil; vop_vptocnp :nil;//@devfs_vptocnp; vop_allocate :nil; - vop_advise :nil; vop_unp_bind :nil; vop_unp_connect :nil; vop_unp_detach :nil; - vop_is_text :nil; - vop_set_text :nil; - vop_unset_text :nil; - vop_get_writecount:nil; - vop_add_writecount:nil; ); implementation diff --git a/sys/vfs/vfs_default.pas b/sys/vfs/vfs_default.pas index 9e7dd829..ecb06659 100644 --- a/sys/vfs/vfs_default.pas +++ b/sys/vfs/vfs_default.pas @@ -61,15 +61,9 @@ function vop_stdputpages(ap:p_vop_putpages_args):Integer; function vop_stdvptofh(ap:p_vop_vptofh_args):Integer; function vop_stdvptocnp(ap:p_vop_vptocnp_args):Integer; function vop_stdallocate(ap:p_vop_allocate_args):Integer; -function vop_stdadvise(ap:p_vop_advise_args):Integer; function vop_stdunp_bind(ap:p_vop_unp_bind_args):Integer; function vop_stdunp_connect(ap:p_vop_unp_connect_args):Integer; function vop_stdunp_detach(ap:p_vop_unp_detach_args):Integer; -function vop_stdis_text(ap:p_vop_is_text_args):Integer; -function vop_stdset_text(ap:p_vop_set_text_args):Integer; -function vop_stdunset_text(ap:p_vop_unset_text_args):Integer; -function vop_stdget_writecount(ap:p_vop_get_writecount_args):Integer; -function vop_stdadd_writecount(ap:p_vop_add_writecount_args):Integer; function vfs_stdroot(mp:p_mount;flags:Integer;vpp:pp_vnode):Integer; function vfs_stdstatfs(mp:p_mount;sbp:p_statfs):Integer; @@ -105,7 +99,6 @@ const vop_islocked :@vop_stdislocked ; vop_lookup :@vop_nolookup ; - vop_cachedlookup :nil ; vop_create :nil ; vop_whiteout :nil ; vop_mknod :nil ; @@ -159,15 +152,9 @@ const vop_vptofh :@vop_stdvptofh ; vop_vptocnp :@vop_stdvptocnp ; vop_allocate :@vop_stdallocate ; - vop_advise :@vop_stdadvise ; vop_unp_bind :@vop_stdunp_bind ; vop_unp_connect :@vop_stdunp_connect ; vop_unp_detach :@vop_stdunp_detach ; - vop_is_text :@vop_stdis_text ; - vop_set_text :@vop_stdset_text ; - vop_unset_text :@vop_stdunset_text ; - vop_get_writecount:@vop_stdget_writecount; - vop_add_writecount:@vop_stdadd_writecount ); implementation @@ -1048,61 +1035,6 @@ begin Exit(error); end; -function vop_stdadvise(ap:p_vop_advise_args):Integer; -var - vp:p_vnode; - start, __end:QWORD; - error, vfslocked:Integer; -begin - vp:=ap^.a_vp; - case (ap^.a_advice) of - POSIX_FADV_WILLNEED: - begin - { - * Do nothing for now. Filesystems should provide a - * custom method which starts an asynchronous read of - * the requested region. - } - error:=0; - end; - POSIX_FADV_DONTNEED: - begin - { - * Flush any open FS buffers and then remove pages - * from the backing VM object. Using vinvalbuf() here - * is a bit heavy-handed as it flushes all buffers for - * the given vnode, not just the buffers covering the - * requested range. - } - error:=0; - vfslocked:=VFS_LOCK_GIANT(vp^.v_mount); - vn_lock(vp, LK_EXCLUSIVE or LK_RETRY); - if ((vp^.v_iflag and VI_DOOMED)<>0) then - begin - VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); - Exit(error); - end; - //vinvalbuf(vp, V_CLEANONLY, 0, 0); - //if (vp^.v_object<>nil) then - //begin - // start:=trunc_page(ap^.a_start); - // __end:=round_page(ap^.a_end); - // VM_OBJECT_LOCK(vp^.v_object); - // vm_object_page_cache(vp^.v_object, OFF_TO_IDX(start), OFF_TO_IDX(__end)); - // VM_OBJECT_UNLOCK(vp^.v_object); - //end; - VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); - end; - else - begin - error:=EINVAL; - end; - end; - Exit(error); -end; - function vop_stdunp_bind(ap:p_vop_unp_bind_args):Integer; begin ap^.a_vp^.v_un:=ap^.a_socket; @@ -1121,35 +1053,6 @@ begin Exit(0); end; -function vop_stdis_text(ap:p_vop_is_text_args):Integer; -begin - Exit(ord((ap^.a_vp^.v_vflag and VV_TEXT)<>0)); -end; - -function vop_stdset_text(ap:p_vop_set_text_args):Integer; -begin - ap^.a_vp^.v_vflag:=ap^.a_vp^.v_vflag or VV_TEXT; - Exit(0); -end; - -function vop_stdunset_text(ap:p_vop_unset_text_args):Integer; -begin - ap^.a_vp^.v_vflag:=ap^.a_vp^.v_vflag and (not VV_TEXT); - Exit(0); -end; - -function vop_stdget_writecount(ap:p_vop_get_writecount_args):Integer; -begin - ap^.a_writecount^:=ap^.a_vp^.v_writecount; - Exit(0); -end; - -function vop_stdadd_writecount(ap:p_vop_add_writecount_args):Integer; -begin - Inc(ap^.a_vp^.v_writecount,ap^.a_inc); - Exit(0); -end; - { * vfs default ops * used to fill the vfs function table to get reasonable default Exitvalues. diff --git a/sys/vfs/vfs_vnops.pas b/sys/vfs/vfs_vnops.pas index 3d85756e..5d3dc087 100644 --- a/sys/vfs/vfs_vnops.pas +++ b/sys/vfs/vfs_vnops.pas @@ -304,12 +304,12 @@ restart: if (error<>0) then goto bad; - if (fmode and FWRITE)<>0 then - VOP_ADD_WRITECOUNT(vp, 1); flagp^:=fmode; ASSERT_VOP_LOCKED(vp, 'vn_open_cred'); + if (mps=0) then VFS_UNLOCK_GIANT(ord(vfslocked)); + Exit(0); bad: NDFREE(ndp, NDF_ONLY_PNBUF); @@ -324,9 +324,6 @@ function vn_writechk(vp:p_vnode):Integer; begin ASSERT_VOP_LOCKED(vp, 'vn_writechk'); - if (VOP_IS_TEXT(vp)<>0) then - Exit(ETXTBSY); - Exit(0); end; @@ -447,7 +444,6 @@ begin if ((flags and FWRITE)<>0) then begin Assert(vp^.v_writecount > 0,'vn_close: negative writecount'); - VOP_ADD_WRITECOUNT(vp, -1); end; error:=VOP_CLOSE(vp, flags); vput(vp); @@ -753,7 +749,6 @@ begin p_fadvise_info(fp^.f_advice)^.fa_prevend :=__end; end; mtx_unlock(mtxp^); - error:=VOP_ADVISE(vp, start, __end, POSIX_FADV_DONTNEED); end; VFS_UNLOCK_GIANT(vfslocked); Exit(error); @@ -867,7 +862,6 @@ begin p_fadvise_info(fp^.f_advice)^.fa_prevend :=__end; end; mtx_unlock(mtxp^); - error:=VOP_ADVISE(vp, start, __end, POSIX_FADV_DONTNEED); end; unlock: diff --git a/sys/vfs/vnode.pas b/sys/vfs/vnode.pas index 2d27bd8e..86f4802a 100644 --- a/sys/vfs/vnode.pas +++ b/sys/vfs/vnode.pas @@ -171,7 +171,6 @@ type vop_islocked :Pointer; vop_lookup :Pointer; - vop_cachedlookup :Pointer; vop_create :Pointer; vop_whiteout :Pointer; vop_mknod :Pointer; @@ -225,15 +224,9 @@ type vop_vptofh :Pointer; vop_vptocnp :Pointer; vop_allocate :Pointer; - vop_advise :Pointer; vop_unp_bind :Pointer; vop_unp_connect :Pointer; vop_unp_detach :Pointer; - vop_is_text :Pointer; - vop_set_text :Pointer; - vop_unset_text :Pointer; - vop_get_writecount:Pointer; - vop_add_writecount:Pointer; end; vtype=(VNON,VREG,VDIR,VBLK,VCHR,VLNK,VSOCK,VFIFO,VBAD,VMARKER); diff --git a/sys/vfs/vnode_if.pas b/sys/vfs/vnode_if.pas index 8dda3bb6..e96a0137 100644 --- a/sys/vfs/vnode_if.pas +++ b/sys/vfs/vnode_if.pas @@ -43,14 +43,6 @@ type a_cnp:p_componentname; end; - p_vop_cachedlookup_args=^vop_cachedlookup_args; - vop_cachedlookup_args=record - a_gen:p_vnodeop_desc; - a_dvp:p_vnode; - a_vpp:pp_vnode; - a_cnp:p_componentname; - end; - p_vop_create_args=^vop_create_args; vop_create_args=record a_gen:p_vnodeop_desc; @@ -477,15 +469,6 @@ type a_len :PPtrUint; end; - p_vop_advise_args=^vop_advise_args; - vop_advise_args=record - a_gen :p_vnodeop_desc; - a_vp :p_vnode; - a_start :PtrUint; - a___end :PtrUint; - a_advice:Integer; - end; - p_vop_unp_bind_args=^vop_unp_bind_args; vop_unp_bind_args=record a_gen :p_vnodeop_desc; @@ -506,236 +489,183 @@ type a_vp :p_vnode; end; - p_vop_is_text_args=^vop_is_text_args; - vop_is_text_args=record - a_gen:p_vnodeop_desc; - a_vp :p_vnode; - end; + vop_islocked_t =function(ap:p_vop_islocked_args):Integer; + vop_lookup_t =function(ap:p_vop_lookup_args):Integer; + vop_create_t =function(ap:p_vop_create_args):Integer; + vop_whiteout_t =function(ap:p_vop_whiteout_args):Integer; + vop_mknod_t =function(ap:p_vop_mknod_args):Integer; + vop_open_t =function(ap:p_vop_open_args):Integer; + vop_close_t =function(ap:p_vop_close_args):Integer; + vop_access_t =function(ap:p_vop_access_args):Integer; + vop_accessx_t =function(ap:p_vop_accessx_args):Integer; + vop_getattr_t =function(ap:p_vop_getattr_args):Integer; + vop_setattr_t =function(ap:p_vop_setattr_args):Integer; + vop_markatime_t =function(ap:p_vop_markatime_args):Integer; + vop_read_t =function(ap:p_vop_read_args):Integer; + vop_write_t =function(ap:p_vop_write_args):Integer; + vop_ioctl_t =function(ap:p_vop_ioctl_args):Integer; + vop_poll_t =function(ap:p_vop_poll_args):Integer; + vop_kqfilter_t =function(ap:p_vop_kqfilter_args):Integer; + vop_revoke_t =function(ap:p_vop_revoke_args):Integer; + vop_fsync_t =function(ap:p_vop_fsync_args):Integer; + vop_remove_t =function(ap:p_vop_remove_args):Integer; + vop_link_t =function(ap:p_vop_link_args):Integer; + vop_rename_t =function(ap:p_vop_rename_args):Integer; + vop_mkdir_t =function(ap:p_vop_mkdir_args):Integer; + vop_rmdir_t =function(ap:p_vop_rmdir_args):Integer; + vop_symlink_t =function(ap:p_vop_symlink_args):Integer; + vop_readdir_t =function(ap:p_vop_readdir_args):Integer; + vop_readlink_t =function(ap:p_vop_readlink_args):Integer; + vop_inactive_t =function(ap:p_vop_inactive_args):Integer; + vop_reclaim_t =function(ap:p_vop_reclaim_args):Integer; + vop_lock1_t =function(ap:p_vop_lock1_args):Integer; + vop_unlock_t =function(ap:p_vop_unlock_args):Integer; + vop_bmap_t =function(ap:p_vop_bmap_args):Integer; + vop_strategy_t =function(ap:p_vop_strategy_args):Integer; + vop_getwritemount_t=function(ap:p_vop_getwritemount_args):Integer; + vop_print_t =function(ap:p_vop_print_args):Integer; + vop_pathconf_t =function(ap:p_vop_pathconf_args):Integer; + vop_advlock_t =function(ap:p_vop_advlock_args):Integer; + vop_advlockasync_t =function(ap:p_vop_advlockasync_args):Integer; + vop_advlockpurge_t =function(ap:p_vop_advlockpurge_args):Integer; + vop_reallocblks_t =function(ap:p_vop_reallocblks_args):Integer; + vop_getpages_t =function(ap:p_vop_getpages_args):Integer; + vop_putpages_t =function(ap:p_vop_putpages_args):Integer; + vop_getacl_t =function(ap:p_vop_getacl_args):Integer; + vop_setacl_t =function(ap:p_vop_setacl_args):Integer; + vop_aclcheck_t =function(ap:p_vop_aclcheck_args):Integer; + vop_closeextattr_t =function(ap:p_vop_closeextattr_args):Integer; + vop_getextattr_t =function(ap:p_vop_getextattr_args):Integer; + vop_listextattr_t =function(ap:p_vop_listextattr_args):Integer; + vop_openextattr_t =function(ap:p_vop_openextattr_args):Integer; + vop_deleteextattr_t=function(ap:p_vop_deleteextattr_args):Integer; + vop_setextattr_t =function(ap:p_vop_setextattr_args):Integer; + vop_setlabel_t =function(ap:p_vop_setlabel_args):Integer; + vop_vptofh_t =function(ap:p_vop_vptofh_args):Integer; + vop_vptocnp_t =function(ap:p_vop_vptocnp_args):Integer; + vop_allocate_t =function(ap:p_vop_allocate_args):Integer; + vop_unp_bind_t =function(ap:p_vop_unp_bind_args):Integer; + vop_unp_connect_t =function(ap:p_vop_unp_connect_args):Integer; + vop_unp_detach_t =function(ap:p_vop_unp_detach_args):Integer; - p_vop_set_text_args=^vop_set_text_args; - vop_set_text_args=record - a_gen:p_vnodeop_desc; - a_vp :p_vnode; - end; - - p_vop_unset_text_args=^vop_unset_text_args; - vop_unset_text_args=record - a_gen:p_vnodeop_desc; - a_vp :p_vnode; - end; - - p_vop_get_writecount_args=^vop_get_writecount_args; - vop_get_writecount_args=record - a_gen :p_vnodeop_desc; - a_vp :p_vnode; - a_writecount:PInteger; - end; - - p_vop_add_writecount_args=^vop_add_writecount_args; - vop_add_writecount_args=record - a_gen:p_vnodeop_desc; - a_vp :p_vnode; - a_inc:Integer; - end; - - vop_islocked_t =function(ap:p_vop_islocked_args):Integer; - vop_lookup_t =function(ap:p_vop_lookup_args):Integer; - vop_cachedlookup_t =function(ap:p_vop_cachedlookup_args):Integer; - vop_create_t =function(ap:p_vop_create_args):Integer; - vop_whiteout_t =function(ap:p_vop_whiteout_args):Integer; - vop_mknod_t =function(ap:p_vop_mknod_args):Integer; - vop_open_t =function(ap:p_vop_open_args):Integer; - vop_close_t =function(ap:p_vop_close_args):Integer; - vop_access_t =function(ap:p_vop_access_args):Integer; - vop_accessx_t =function(ap:p_vop_accessx_args):Integer; - vop_getattr_t =function(ap:p_vop_getattr_args):Integer; - vop_setattr_t =function(ap:p_vop_setattr_args):Integer; - vop_markatime_t =function(ap:p_vop_markatime_args):Integer; - vop_read_t =function(ap:p_vop_read_args):Integer; - vop_write_t =function(ap:p_vop_write_args):Integer; - vop_ioctl_t =function(ap:p_vop_ioctl_args):Integer; - vop_poll_t =function(ap:p_vop_poll_args):Integer; - vop_kqfilter_t =function(ap:p_vop_kqfilter_args):Integer; - vop_revoke_t =function(ap:p_vop_revoke_args):Integer; - vop_fsync_t =function(ap:p_vop_fsync_args):Integer; - vop_remove_t =function(ap:p_vop_remove_args):Integer; - vop_link_t =function(ap:p_vop_link_args):Integer; - vop_rename_t =function(ap:p_vop_rename_args):Integer; - vop_mkdir_t =function(ap:p_vop_mkdir_args):Integer; - vop_rmdir_t =function(ap:p_vop_rmdir_args):Integer; - vop_symlink_t =function(ap:p_vop_symlink_args):Integer; - vop_readdir_t =function(ap:p_vop_readdir_args):Integer; - vop_readlink_t =function(ap:p_vop_readlink_args):Integer; - vop_inactive_t =function(ap:p_vop_inactive_args):Integer; - vop_reclaim_t =function(ap:p_vop_reclaim_args):Integer; - vop_lock1_t =function(ap:p_vop_lock1_args):Integer; - vop_unlock_t =function(ap:p_vop_unlock_args):Integer; - vop_bmap_t =function(ap:p_vop_bmap_args):Integer; - vop_strategy_t =function(ap:p_vop_strategy_args):Integer; - vop_getwritemount_t =function(ap:p_vop_getwritemount_args):Integer; - vop_print_t =function(ap:p_vop_print_args):Integer; - vop_pathconf_t =function(ap:p_vop_pathconf_args):Integer; - vop_advlock_t =function(ap:p_vop_advlock_args):Integer; - vop_advlockasync_t =function(ap:p_vop_advlockasync_args):Integer; - vop_advlockpurge_t =function(ap:p_vop_advlockpurge_args):Integer; - vop_reallocblks_t =function(ap:p_vop_reallocblks_args):Integer; - vop_getpages_t =function(ap:p_vop_getpages_args):Integer; - vop_putpages_t =function(ap:p_vop_putpages_args):Integer; - vop_getacl_t =function(ap:p_vop_getacl_args):Integer; - vop_setacl_t =function(ap:p_vop_setacl_args):Integer; - vop_aclcheck_t =function(ap:p_vop_aclcheck_args):Integer; - vop_closeextattr_t =function(ap:p_vop_closeextattr_args):Integer; - vop_getextattr_t =function(ap:p_vop_getextattr_args):Integer; - vop_listextattr_t =function(ap:p_vop_listextattr_args):Integer; - vop_openextattr_t =function(ap:p_vop_openextattr_args):Integer; - vop_deleteextattr_t =function(ap:p_vop_deleteextattr_args):Integer; - vop_setextattr_t =function(ap:p_vop_setextattr_args):Integer; - vop_setlabel_t =function(ap:p_vop_setlabel_args):Integer; - vop_vptofh_t =function(ap:p_vop_vptofh_args):Integer; - vop_vptocnp_t =function(ap:p_vop_vptocnp_args):Integer; - vop_allocate_t =function(ap:p_vop_allocate_args):Integer; - vop_advise_t =function(ap:p_vop_advise_args):Integer; - vop_unp_bind_t =function(ap:p_vop_unp_bind_args):Integer; - vop_unp_connect_t =function(ap:p_vop_unp_connect_args):Integer; - vop_unp_detach_t =function(ap:p_vop_unp_detach_args):Integer; - vop_is_text_t =function(ap:p_vop_is_text_args):Integer; - vop_set_text_t =function(ap:p_vop_set_text_args):Integer; - vop_unset_text_t =function(ap:p_vop_unset_text_args):Integer; - vop_get_writecount_t=function(ap:p_vop_get_writecount_args):Integer; - vop_add_writecount_t=function(ap:p_vop_add_writecount_args):Integer; - -function VOP_ISLOCKED (vp:p_vnode):Integer; -function VOP_LOOKUP (dvp:p_vnode;vpp:pp_vnode;cnp:p_componentname):Integer; -function VOP_CACHEDLOOKUP (dvp:p_vnode;vpp:pp_vnode;cnp:p_componentname):Integer; -function VOP_CREATE (dvp:p_vnode;vpp:pp_vnode;cnp:p_componentname;vap:p_vattr):Integer; -function VOP_WHITEOUT (dvp:p_vnode;cnp:p_componentname;flags:Integer):Integer; -function VOP_MKNOD (dvp:p_vnode;vpp:pp_vnode;cnp:p_componentname;vap:p_vattr):Integer; -function VOP_OPEN (vp:p_vnode;mode:Integer;fp:p_file):Integer; -function VOP_CLOSE (vp:p_vnode;fflag:Integer):Integer; -function VOP_ACCESS (vp:p_vnode;accmode:accmode_t):Integer; -function VOP_ACCESSX (vp:p_vnode;accmode:accmode_t):Integer; -function VOP_GETATTR (vp:p_vnode;vap:p_vattr):Integer; -function VOP_SETATTR (vp:p_vnode;vap:p_vattr):Integer; -function VOP_MARKATIME (vp:p_vnode):Integer; -function VOP_READ (vp:p_vnode;uio:p_uio;ioflag:Integer):Integer; -function VOP_WRITE (vp:p_vnode;uio:p_uio;ioflag:Integer):Integer; -function VOP_IOCTL (vp:p_vnode;command:PtrUint;data:Pointer;fflag:Integer):Integer; -function VOP_POLL (vp:p_vnode;events:Integer):Integer; -function VOP_KQFILTER (vp:p_vnode;kn:p_knote):Integer; -function VOP_REVOKE (vp:p_vnode;flags:Integer):Integer; -function VOP_FSYNC (vp:p_vnode;waitfor:Integer):Integer; -function VOP_REMOVE (dvp:p_vnode;vp:p_vnode;cnp:p_componentname):Integer; -function VOP_LINK (tdvp:p_vnode;vp:p_vnode;cnp:p_componentname):Integer; -function VOP_RENAME (fdvp:p_vnode;fvp:p_vnode;fcnp:p_componentname;tdvp:p_vnode;tvp:p_vnode;tcnp:p_componentname):Integer; -function VOP_MKDIR (dvp:p_vnode;vpp:pp_vnode;cnp:p_componentname;vap:p_vattr):Integer; -function VOP_RMDIR (dvp:p_vnode;vp:p_vnode;cnp:p_componentname):Integer; -function VOP_SYMLINK (dvp:p_vnode;vpp:pp_vnode;cnp:p_componentname;vap:p_vattr;target:PChar):Integer; -function VOP_READDIR (vp:p_vnode;uio:p_uio;eofflag:PInteger;ncookies:PInteger;cookies:PPPtrUint):Integer; -function VOP_READLINK (vp:p_vnode;uio:p_uio):Integer; -function VOP_INACTIVE (vp:p_vnode):Integer; -function VOP_RECLAIM (vp:p_vnode):Integer; -function VOP_LOCK (vp:p_vnode;flags:Integer;_file:PChar;line:Integer):Integer; -function VOP_UNLOCK (vp:p_vnode;flags:Integer):Integer; -function VOP_BMAP (vp:p_vnode;bn:daddr_t;bop:pp_bufobj;bnp:p_daddr_t;runp:PInteger;runb:PInteger):Integer; -function VOP_STRATEGY (vp:p_vnode;bp:p_buf):Integer; -function VOP_GETWRITEMOUNT (vp:p_vnode;mpp:pp_mount):Integer; -function VOP_PRINT (vp:p_vnode):Integer; -function VOP_PATHCONF (vp:p_vnode;name:Integer;retval:PPtrUint):Integer; -function VOP_ADVLOCK (vp:p_vnode;id:Pointer;op:Integer;fl:p_flock;flags:Integer):Integer; -function VOP_ADVLOCKASYNC (vp:p_vnode;id:Pointer;op:Integer;fl:p_flock;flags:Integer;task:p_task;cookiep:PPointer):Integer; -function VOP_ADVLOCKPURGE (vp:p_vnode):Integer; -function VOP_REALLOCBLKS (vp:p_vnode;buflist:p_cluster_save):Integer; -function VOP_GETPAGES (vp:p_vnode;m:p_vm_page_t;count:Integer;reqpage:Integer;offset:PtrUint):Integer; -function VOP_PUTPAGES (vp:p_vnode;m:p_vm_page_t;count:Integer;sync:Integer;rtvals:PInteger;offset:PtrUint):Integer; -function VOP_GETACL (vp:p_vnode;_type:acl_type_t;aclp:p_acl):Integer; -function VOP_SETACL (vp:p_vnode;_type:acl_type_t;aclp:p_acl):Integer; -function VOP_ACLCHECK (vp:p_vnode;_type:acl_type_t;aclp:p_acl):Integer; -function VOP_CLOSEEXTATTR (vp:p_vnode;commit:Integer):Integer; -function VOP_GETEXTATTR (vp:p_vnode;attrnamespace:Integer;name:PChar;uio:p_uio;size:PPtrUint):Integer; -function VOP_LISTEXTATTR (vp:p_vnode;attrnamespace:Integer;uio:p_uio;size:PPtrUint):Integer; -function VOP_OPENEXTATTR (vp:p_vnode):Integer; -function VOP_DELETEEXTATTR (vp:p_vnode;attrnamespace:Integer;name:PChar):Integer; -function VOP_SETEXTATTR (vp:p_vnode;attrnamespace:Integer;name:PChar;uio:p_uio):Integer; -function VOP_SETLABEL (vp:p_vnode;_label:p_label):Integer; -function VOP_VPTOFH (vp:p_vnode;fhp:p_fid):Integer; -function VOP_VPTOCNP (vp:p_vnode;vpp:pp_vnode;buf:PChar;buflen:PInteger):Integer; -function VOP_ALLOCATE (vp:p_vnode;offset:PPtrUint;len:PPtrUint):Integer; -function VOP_ADVISE (vp:p_vnode;start:PtrUint;__end:PtrUint;advice:Integer):Integer; -function VOP_UNP_BIND (vp:p_vnode;socket:p_socket):Integer; -function VOP_UNP_CONNECT (vp:p_vnode;socket:pp_socket):Integer; -function VOP_UNP_DETACH (vp:p_vnode):Integer; -function VOP_IS_TEXT (vp:p_vnode):Integer; -function VOP_SET_TEXT (vp:p_vnode):Integer; -function VOP_UNSET_TEXT (vp:p_vnode):Integer; -function VOP_GET_WRITECOUNT(vp:p_vnode;writecount:PInteger):Integer; -function VOP_ADD_WRITECOUNT(vp:p_vnode;inc:Integer):Integer; +function VOP_ISLOCKED (vp:p_vnode):Integer; +function VOP_LOOKUP (dvp:p_vnode;vpp:pp_vnode;cnp:p_componentname):Integer; +function VOP_CREATE (dvp:p_vnode;vpp:pp_vnode;cnp:p_componentname;vap:p_vattr):Integer; +function VOP_WHITEOUT (dvp:p_vnode;cnp:p_componentname;flags:Integer):Integer; +function VOP_MKNOD (dvp:p_vnode;vpp:pp_vnode;cnp:p_componentname;vap:p_vattr):Integer; +function VOP_OPEN (vp:p_vnode;mode:Integer;fp:p_file):Integer; +function VOP_CLOSE (vp:p_vnode;fflag:Integer):Integer; +function VOP_ACCESS (vp:p_vnode;accmode:accmode_t):Integer; +function VOP_ACCESSX (vp:p_vnode;accmode:accmode_t):Integer; +function VOP_GETATTR (vp:p_vnode;vap:p_vattr):Integer; +function VOP_SETATTR (vp:p_vnode;vap:p_vattr):Integer; +function VOP_MARKATIME (vp:p_vnode):Integer; +function VOP_READ (vp:p_vnode;uio:p_uio;ioflag:Integer):Integer; +function VOP_WRITE (vp:p_vnode;uio:p_uio;ioflag:Integer):Integer; +function VOP_IOCTL (vp:p_vnode;command:PtrUint;data:Pointer;fflag:Integer):Integer; +function VOP_POLL (vp:p_vnode;events:Integer):Integer; +function VOP_KQFILTER (vp:p_vnode;kn:p_knote):Integer; +function VOP_REVOKE (vp:p_vnode;flags:Integer):Integer; +function VOP_FSYNC (vp:p_vnode;waitfor:Integer):Integer; +function VOP_REMOVE (dvp:p_vnode;vp:p_vnode;cnp:p_componentname):Integer; +function VOP_LINK (tdvp:p_vnode;vp:p_vnode;cnp:p_componentname):Integer; +function VOP_RENAME (fdvp:p_vnode;fvp:p_vnode;fcnp:p_componentname;tdvp:p_vnode;tvp:p_vnode;tcnp:p_componentname):Integer; +function VOP_MKDIR (dvp:p_vnode;vpp:pp_vnode;cnp:p_componentname;vap:p_vattr):Integer; +function VOP_RMDIR (dvp:p_vnode;vp:p_vnode;cnp:p_componentname):Integer; +function VOP_SYMLINK (dvp:p_vnode;vpp:pp_vnode;cnp:p_componentname;vap:p_vattr;target:PChar):Integer; +function VOP_READDIR (vp:p_vnode;uio:p_uio;eofflag:PInteger;ncookies:PInteger;cookies:PPPtrUint):Integer; +function VOP_READLINK (vp:p_vnode;uio:p_uio):Integer; +function VOP_INACTIVE (vp:p_vnode):Integer; +function VOP_RECLAIM (vp:p_vnode):Integer; +function VOP_LOCK (vp:p_vnode;flags:Integer;_file:PChar;line:Integer):Integer; +function VOP_UNLOCK (vp:p_vnode;flags:Integer):Integer; +function VOP_BMAP (vp:p_vnode;bn:daddr_t;bop:pp_bufobj;bnp:p_daddr_t;runp:PInteger;runb:PInteger):Integer; +function VOP_STRATEGY (vp:p_vnode;bp:p_buf):Integer; +function VOP_GETWRITEMOUNT(vp:p_vnode;mpp:pp_mount):Integer; +function VOP_PRINT (vp:p_vnode):Integer; +function VOP_PATHCONF (vp:p_vnode;name:Integer;retval:PPtrUint):Integer; +function VOP_ADVLOCK (vp:p_vnode;id:Pointer;op:Integer;fl:p_flock;flags:Integer):Integer; +function VOP_ADVLOCKASYNC (vp:p_vnode;id:Pointer;op:Integer;fl:p_flock;flags:Integer;task:p_task;cookiep:PPointer):Integer; +function VOP_ADVLOCKPURGE (vp:p_vnode):Integer; +function VOP_REALLOCBLKS (vp:p_vnode;buflist:p_cluster_save):Integer; +function VOP_GETPAGES (vp:p_vnode;m:p_vm_page_t;count:Integer;reqpage:Integer;offset:PtrUint):Integer; +function VOP_PUTPAGES (vp:p_vnode;m:p_vm_page_t;count:Integer;sync:Integer;rtvals:PInteger;offset:PtrUint):Integer; +function VOP_GETACL (vp:p_vnode;_type:acl_type_t;aclp:p_acl):Integer; +function VOP_SETACL (vp:p_vnode;_type:acl_type_t;aclp:p_acl):Integer; +function VOP_ACLCHECK (vp:p_vnode;_type:acl_type_t;aclp:p_acl):Integer; +function VOP_CLOSEEXTATTR (vp:p_vnode;commit:Integer):Integer; +function VOP_GETEXTATTR (vp:p_vnode;attrnamespace:Integer;name:PChar;uio:p_uio;size:PPtrUint):Integer; +function VOP_LISTEXTATTR (vp:p_vnode;attrnamespace:Integer;uio:p_uio;size:PPtrUint):Integer; +function VOP_OPENEXTATTR (vp:p_vnode):Integer; +function VOP_DELETEEXTATTR(vp:p_vnode;attrnamespace:Integer;name:PChar):Integer; +function VOP_SETEXTATTR (vp:p_vnode;attrnamespace:Integer;name:PChar;uio:p_uio):Integer; +function VOP_SETLABEL (vp:p_vnode;_label:p_label):Integer; +function VOP_VPTOFH (vp:p_vnode;fhp:p_fid):Integer; +function VOP_VPTOCNP (vp:p_vnode;vpp:pp_vnode;buf:PChar;buflen:PInteger):Integer; +function VOP_ALLOCATE (vp:p_vnode;offset:PPtrUint;len:PPtrUint):Integer; +function VOP_UNP_BIND (vp:p_vnode;socket:p_socket):Integer; +function VOP_UNP_CONNECT (vp:p_vnode;socket:pp_socket):Integer; +function VOP_UNP_DETACH (vp:p_vnode):Integer; const - vop_islocked_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_islocked_args(nil)^.a_vp)),Byte(-1)); - vop_lookup_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_lookup_args(nil)^.a_dvp)),Byte(-1)); - vop_cachedlookup_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_cachedlookup_args(nil)^.a_dvp)),Byte(-1)); - vop_create_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_create_args(nil)^.a_dvp)),Byte(-1)); - vop_whiteout_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_whiteout_args(nil)^.a_dvp)),Byte(-1)); - vop_mknod_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_mknod_args(nil)^.a_dvp)),Byte(-1)); - vop_open_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_open_args(nil)^.a_vp)),Byte(-1)); - vop_close_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_close_args(nil)^.a_vp)),Byte(-1)); - vop_access_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_access_args(nil)^.a_vp)),Byte(-1)); - vop_accessx_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_accessx_args(nil)^.a_vp)),Byte(-1)); - vop_getattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_getattr_args(nil)^.a_vp)),Byte(-1)); - vop_setattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_setattr_args(nil)^.a_vp)),Byte(-1)); - vop_markatime_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_markatime_args(nil)^.a_vp)),Byte(-1)); - vop_read_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_read_args(nil)^.a_vp)),Byte(-1)); - vop_write_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_write_args(nil)^.a_vp)),Byte(-1)); - vop_ioctl_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_ioctl_args(nil)^.a_vp)),Byte(-1)); - vop_poll_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_poll_args(nil)^.a_vp)),Byte(-1)); - vop_kqfilter_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_kqfilter_args(nil)^.a_vp)),Byte(-1)); - vop_revoke_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_revoke_args(nil)^.a_vp)),Byte(-1)); - vop_fsync_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_fsync_args(nil)^.a_vp)),Byte(-1)); - vop_remove_vp_offsets :array[0..2] of Byte=(Byte(ptrint(@p_vop_remove_args(nil)^.a_dvp)),Byte(ptrint(@p_vop_remove_args(nil)^.a_vp)),Byte(-1)); - vop_link_vp_offsets :array[0..2] of Byte=(Byte(ptrint(@p_vop_link_args(nil)^.a_tdvp)),Byte(ptrint(@p_vop_link_args(nil)^.a_vp)),Byte(-1)); - vop_rename_vp_offsets :array[0..4] of Byte=(Byte(ptrint(@p_vop_rename_args(nil)^.a_fdvp)),Byte(ptrint(@p_vop_rename_args(nil)^.a_fvp)),Byte(ptrint(@p_vop_rename_args(nil)^.a_tdvp)),Byte(ptrint(@p_vop_rename_args(nil)^.a_tvp)),Byte(-1)); - vop_mkdir_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_mkdir_args(nil)^.a_dvp)),Byte(-1)); - vop_rmdir_vp_offsets :array[0..2] of Byte=(Byte(ptrint(@p_vop_rmdir_args(nil)^.a_dvp)),Byte(ptrint(@p_vop_rmdir_args(nil)^.a_vp)),Byte(-1)); - vop_symlink_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_symlink_args(nil)^.a_dvp)),Byte(-1)); - vop_readdir_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_readdir_args(nil)^.a_vp)),Byte(-1)); - vop_readlink_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_readlink_args(nil)^.a_vp)),Byte(-1)); - vop_inactive_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_inactive_args(nil)^.a_vp)),Byte(-1)); - vop_reclaim_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_reclaim_args(nil)^.a_vp)),Byte(-1)); - vop_lock1_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_lock1_args(nil)^.a_vp)),Byte(-1)); - vop_unlock_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_unlock_args(nil)^.a_vp)),Byte(-1)); - vop_bmap_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_bmap_args(nil)^.a_vp)),Byte(-1)); - vop_strategy_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_strategy_args(nil)^.a_vp)),Byte(-1)); - vop_getwritemount_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_getwritemount_args(nil)^.a_vp)),Byte(-1)); - vop_print_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_print_args(nil)^.a_vp)),Byte(-1)); - vop_pathconf_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_pathconf_args(nil)^.a_vp)),Byte(-1)); - vop_advlock_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_advlock_args(nil)^.a_vp)),Byte(-1)); - vop_advlockasync_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_advlockasync_args(nil)^.a_vp)),Byte(-1)); - vop_advlockpurge_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_advlockpurge_args(nil)^.a_vp)),Byte(-1)); - vop_reallocblks_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_reallocblks_args(nil)^.a_vp)),Byte(-1)); - vop_getpages_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_getpages_args(nil)^.a_vp)),Byte(-1)); - vop_putpages_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_putpages_args(nil)^.a_vp)),Byte(-1)); - vop_getacl_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_getacl_args(nil)^.a_vp)),Byte(-1)); - vop_setacl_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_setacl_args(nil)^.a_vp)),Byte(-1)); - vop_aclcheck_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_aclcheck_args(nil)^.a_vp)),Byte(-1)); - vop_closeextattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_closeextattr_args(nil)^.a_vp)),Byte(-1)); - vop_getextattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_getextattr_args(nil)^.a_vp)),Byte(-1)); - vop_listextattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_listextattr_args(nil)^.a_vp)),Byte(-1)); - vop_openextattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_openextattr_args(nil)^.a_vp)),Byte(-1)); - vop_deleteextattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_deleteextattr_args(nil)^.a_vp)),Byte(-1)); - vop_setextattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_setextattr_args(nil)^.a_vp)),Byte(-1)); - vop_setlabel_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_setlabel_args(nil)^.a_vp)),Byte(-1)); - vop_vptofh_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_vptofh_args(nil)^.a_vp)),Byte(-1)); - vop_vptocnp_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_vptocnp_args(nil)^.a_vp)),Byte(-1)); - vop_allocate_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_allocate_args(nil)^.a_vp)),Byte(-1)); - vop_advise_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_advise_args(nil)^.a_vp)),Byte(-1)); - vop_unp_bind_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_unp_bind_args(nil)^.a_vp)),Byte(-1)); - vop_unp_connect_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_unp_connect_args(nil)^.a_vp)),Byte(-1)); - vop_unp_detach_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_unp_detach_args(nil)^.a_vp)),Byte(-1)); - vop_is_text_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_is_text_args(nil)^.a_vp)),Byte(-1)); - vop_set_text_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_set_text_args(nil)^.a_vp)),Byte(-1)); - vop_unset_text_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_unset_text_args(nil)^.a_vp)),Byte(-1)); - vop_get_writecount_vp_offsets:array[0..1] of Byte=(Byte(ptrint(@p_vop_get_writecount_args(nil)^.a_vp)),Byte(-1)); - vop_add_writecount_vp_offsets:array[0..1] of Byte=(Byte(ptrint(@p_vop_add_writecount_args(nil)^.a_vp)),Byte(-1)); + vop_islocked_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_islocked_args(nil)^.a_vp)),Byte(-1)); + vop_lookup_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_lookup_args(nil)^.a_dvp)),Byte(-1)); + vop_create_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_create_args(nil)^.a_dvp)),Byte(-1)); + vop_whiteout_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_whiteout_args(nil)^.a_dvp)),Byte(-1)); + vop_mknod_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_mknod_args(nil)^.a_dvp)),Byte(-1)); + vop_open_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_open_args(nil)^.a_vp)),Byte(-1)); + vop_close_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_close_args(nil)^.a_vp)),Byte(-1)); + vop_access_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_access_args(nil)^.a_vp)),Byte(-1)); + vop_accessx_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_accessx_args(nil)^.a_vp)),Byte(-1)); + vop_getattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_getattr_args(nil)^.a_vp)),Byte(-1)); + vop_setattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_setattr_args(nil)^.a_vp)),Byte(-1)); + vop_markatime_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_markatime_args(nil)^.a_vp)),Byte(-1)); + vop_read_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_read_args(nil)^.a_vp)),Byte(-1)); + vop_write_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_write_args(nil)^.a_vp)),Byte(-1)); + vop_ioctl_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_ioctl_args(nil)^.a_vp)),Byte(-1)); + vop_poll_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_poll_args(nil)^.a_vp)),Byte(-1)); + vop_kqfilter_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_kqfilter_args(nil)^.a_vp)),Byte(-1)); + vop_revoke_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_revoke_args(nil)^.a_vp)),Byte(-1)); + vop_fsync_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_fsync_args(nil)^.a_vp)),Byte(-1)); + vop_remove_vp_offsets :array[0..2] of Byte=(Byte(ptrint(@p_vop_remove_args(nil)^.a_dvp)),Byte(ptrint(@p_vop_remove_args(nil)^.a_vp)),Byte(-1)); + vop_link_vp_offsets :array[0..2] of Byte=(Byte(ptrint(@p_vop_link_args(nil)^.a_tdvp)),Byte(ptrint(@p_vop_link_args(nil)^.a_vp)),Byte(-1)); + vop_rename_vp_offsets :array[0..4] of Byte=(Byte(ptrint(@p_vop_rename_args(nil)^.a_fdvp)),Byte(ptrint(@p_vop_rename_args(nil)^.a_fvp)),Byte(ptrint(@p_vop_rename_args(nil)^.a_tdvp)),Byte(ptrint(@p_vop_rename_args(nil)^.a_tvp)),Byte(-1)); + vop_mkdir_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_mkdir_args(nil)^.a_dvp)),Byte(-1)); + vop_rmdir_vp_offsets :array[0..2] of Byte=(Byte(ptrint(@p_vop_rmdir_args(nil)^.a_dvp)),Byte(ptrint(@p_vop_rmdir_args(nil)^.a_vp)),Byte(-1)); + vop_symlink_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_symlink_args(nil)^.a_dvp)),Byte(-1)); + vop_readdir_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_readdir_args(nil)^.a_vp)),Byte(-1)); + vop_readlink_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_readlink_args(nil)^.a_vp)),Byte(-1)); + vop_inactive_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_inactive_args(nil)^.a_vp)),Byte(-1)); + vop_reclaim_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_reclaim_args(nil)^.a_vp)),Byte(-1)); + vop_lock1_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_lock1_args(nil)^.a_vp)),Byte(-1)); + vop_unlock_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_unlock_args(nil)^.a_vp)),Byte(-1)); + vop_bmap_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_bmap_args(nil)^.a_vp)),Byte(-1)); + vop_strategy_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_strategy_args(nil)^.a_vp)),Byte(-1)); + vop_getwritemount_vp_offsets:array[0..1] of Byte=(Byte(ptrint(@p_vop_getwritemount_args(nil)^.a_vp)),Byte(-1)); + vop_print_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_print_args(nil)^.a_vp)),Byte(-1)); + vop_pathconf_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_pathconf_args(nil)^.a_vp)),Byte(-1)); + vop_advlock_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_advlock_args(nil)^.a_vp)),Byte(-1)); + vop_advlockasync_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_advlockasync_args(nil)^.a_vp)),Byte(-1)); + vop_advlockpurge_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_advlockpurge_args(nil)^.a_vp)),Byte(-1)); + vop_reallocblks_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_reallocblks_args(nil)^.a_vp)),Byte(-1)); + vop_getpages_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_getpages_args(nil)^.a_vp)),Byte(-1)); + vop_putpages_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_putpages_args(nil)^.a_vp)),Byte(-1)); + vop_getacl_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_getacl_args(nil)^.a_vp)),Byte(-1)); + vop_setacl_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_setacl_args(nil)^.a_vp)),Byte(-1)); + vop_aclcheck_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_aclcheck_args(nil)^.a_vp)),Byte(-1)); + vop_closeextattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_closeextattr_args(nil)^.a_vp)),Byte(-1)); + vop_getextattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_getextattr_args(nil)^.a_vp)),Byte(-1)); + vop_listextattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_listextattr_args(nil)^.a_vp)),Byte(-1)); + vop_openextattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_openextattr_args(nil)^.a_vp)),Byte(-1)); + vop_deleteextattr_vp_offsets:array[0..1] of Byte=(Byte(ptrint(@p_vop_deleteextattr_args(nil)^.a_vp)),Byte(-1)); + vop_setextattr_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_setextattr_args(nil)^.a_vp)),Byte(-1)); + vop_setlabel_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_setlabel_args(nil)^.a_vp)),Byte(-1)); + vop_vptofh_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_vptofh_args(nil)^.a_vp)),Byte(-1)); + vop_vptocnp_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_vptocnp_args(nil)^.a_vp)),Byte(-1)); + vop_allocate_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_allocate_args(nil)^.a_vp)),Byte(-1)); + vop_unp_bind_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_unp_bind_args(nil)^.a_vp)),Byte(-1)); + vop_unp_connect_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_unp_connect_args(nil)^.a_vp)),Byte(-1)); + vop_unp_detach_vp_offsets :array[0..1] of Byte=(Byte(ptrint(@p_vop_unp_detach_args(nil)^.a_vp)),Byte(-1)); vop_default_desc:t_vnodeop_desc=( vdesc_name :'default'; @@ -761,14 +691,6 @@ const vdesc_vpp_offset :Integer(ptrint(@p_vop_lookup_args(nil)^.a_vpp)); ); - vop_cachedlookup_desc:t_vnodeop_desc=( - vdesc_name :'vop_cachedlookup'; - vdesc_call :@p_vop_vector(nil)^.vop_cachedlookup; - vdesc_vp_offsets :@vop_cachedlookup_vp_offsets; - vdesc_flags :0; - vdesc_vpp_offset :Integer(ptrint(@p_vop_cachedlookup_args(nil)^.a_vpp)); - ); - vop_create_desc:t_vnodeop_desc=( vdesc_name :'vop_create'; vdesc_call :@p_vop_vector(nil)^.vop_create; @@ -1193,14 +1115,6 @@ const vdesc_vpp_offset :-1; ); - vop_advise_desc:t_vnodeop_desc=( - vdesc_name :'vop_advise'; - vdesc_call :@p_vop_vector(nil)^.vop_advise; - vdesc_vp_offsets :@vop_advise_vp_offsets; - vdesc_flags :0; - vdesc_vpp_offset :-1; - ); - vop_unp_bind_desc:t_vnodeop_desc=( vdesc_name :'vop_unp_bind'; vdesc_call :@p_vop_vector(nil)^.vop_unp_bind; @@ -1225,46 +1139,6 @@ const vdesc_vpp_offset :-1; ); - vop_is_text_desc:t_vnodeop_desc=( - vdesc_name :'vop_is_text'; - vdesc_call :@p_vop_vector(nil)^.vop_is_text; - vdesc_vp_offsets :@vop_is_text_vp_offsets; - vdesc_flags :0; - vdesc_vpp_offset :-1; - ); - - vop_set_text_desc:t_vnodeop_desc=( - vdesc_name :'vop_set_text'; - vdesc_call :@p_vop_vector(nil)^.vop_set_text; - vdesc_vp_offsets :@vop_set_text_vp_offsets; - vdesc_flags :0; - vdesc_vpp_offset :-1; - ); - - vop_unset_text_desc:t_vnodeop_desc=( - vdesc_name :'vop_unset_text'; - vdesc_call :@p_vop_vector(nil)^.vop_unset_text; - vdesc_vp_offsets :@vop_unset_text_vp_offsets; - vdesc_flags :0; - vdesc_vpp_offset :-1; - ); - - vop_get_writecount_desc:t_vnodeop_desc=( - vdesc_name :'vop_get_writecount'; - vdesc_call :@p_vop_vector(nil)^.vop_get_writecount; - vdesc_vp_offsets :@vop_get_writecount_vp_offsets; - vdesc_flags :0; - vdesc_vpp_offset :-1; - ); - - vop_add_writecount_desc:t_vnodeop_desc=( - vdesc_name :'vop_add_writecount'; - vdesc_call :@p_vop_vector(nil)^.vop_add_writecount; - vdesc_vp_offsets :@vop_add_writecount_vp_offsets; - vdesc_flags :0; - vdesc_vpp_offset :-1; - ); - implementation uses @@ -1327,23 +1201,6 @@ begin VFS_EPILOGUE(s); end; -function VOP_CACHEDLOOKUP(dvp:p_vnode;vpp:pp_vnode;cnp:p_componentname):Integer; -var - c:Pointer; - a:vop_cachedlookup_args; - s:Boolean; -begin - c:=get_vp_cb(dvp,vop_cachedlookup_desc.vdesc_call); - Assert(c<>nil,'VOP_CACHEDLOOKUP'); - a.a_gen:=@vop_cachedlookup_desc; - a.a_dvp:=dvp; - a.a_vpp:=vpp; - a.a_cnp:=cnp; - s:=VFS_PROLOGUE(dvp^.v_mount); - Result:=vop_cachedlookup_t(c)(@a); - VFS_EPILOGUE(s); -end; - function VOP_CREATE(dvp:p_vnode;vpp:pp_vnode;cnp:p_componentname;vap:p_vattr):Integer; var c:Pointer; @@ -2262,24 +2119,6 @@ begin VFS_EPILOGUE(s); end; -function VOP_ADVISE(vp:p_vnode;start:PtrUint;__end:PtrUint;advice:Integer):Integer; -var - c:Pointer; - a:vop_advise_args; - s:Boolean; -begin - c:=get_vp_cb(vp,vop_advise_desc.vdesc_call); - Assert(c<>nil,'VOP_ADVISE'); - a.a_gen :=@vop_advise_desc; - a.a_vp :=vp; - a.a_start :=start; - a.a___end :=__end; - a.a_advice:=advice; - s:=VFS_PROLOGUE(vp^.v_mount); - Result:=vop_advise_t(c)(@a); - VFS_EPILOGUE(s); -end; - function VOP_UNP_BIND(vp:p_vnode;socket:p_socket):Integer; var c:Pointer; @@ -2327,82 +2166,5 @@ begin VFS_EPILOGUE(s); end; -function VOP_IS_TEXT(vp:p_vnode):Integer; -var - c:Pointer; - a:vop_is_text_args; - s:Boolean; -begin - c:=get_vp_cb(vp,vop_is_text_desc.vdesc_call); - Assert(c<>nil,'VOP_IS_TEXT'); - a.a_gen:=@vop_is_text_desc; - a.a_vp :=vp; - s:=VFS_PROLOGUE(vp^.v_mount); - Result:=vop_is_text_t(c)(@a); - VFS_EPILOGUE(s); -end; - -function VOP_SET_TEXT(vp:p_vnode):Integer; -var - c:Pointer; - a:vop_set_text_args; - s:Boolean; -begin - c:=get_vp_cb(vp,vop_set_text_desc.vdesc_call); - Assert(c<>nil,'VOP_SET_TEXT'); - a.a_gen:=@vop_set_text_desc; - a.a_vp :=vp; - s:=VFS_PROLOGUE(vp^.v_mount); - Result:=vop_set_text_t(c)(@a); - VFS_EPILOGUE(s); -end; - -function VOP_UNSET_TEXT(vp:p_vnode):Integer; -var - c:Pointer; - a:vop_unset_text_args; - s:Boolean; -begin - c:=get_vp_cb(vp,vop_unset_text_desc.vdesc_call); - Assert(c<>nil,'VOP_UNSET_TEXT'); - a.a_gen:=@vop_unset_text_desc; - a.a_vp :=vp; - s:=VFS_PROLOGUE(vp^.v_mount); - Result:=vop_unset_text_t(c)(@a); - VFS_EPILOGUE(s); -end; - -function VOP_GET_WRITECOUNT(vp:p_vnode;writecount:PInteger):Integer; -var - c:Pointer; - a:vop_get_writecount_args; - s:Boolean; -begin - c:=get_vp_cb(vp,vop_get_writecount_desc.vdesc_call); - Assert(c<>nil,'VOP_GET_WRITECOUNT'); - a.a_gen :=@vop_get_writecount_desc; - a.a_vp :=vp; - a.a_writecount:=writecount; - s:=VFS_PROLOGUE(vp^.v_mount); - Result:=vop_get_writecount_t(c)(@a); - VFS_EPILOGUE(s); -end; - -function VOP_ADD_WRITECOUNT(vp:p_vnode;inc:Integer):Integer; -var - c:Pointer; - a:vop_add_writecount_args; - s:Boolean; -begin - c:=get_vp_cb(vp,vop_add_writecount_desc.vdesc_call); - Assert(c<>nil,'VOP_ADD_WRITECOUNT'); - a.a_gen:=@vop_add_writecount_desc; - a.a_vp :=vp; - a.a_inc:=inc; - s:=VFS_PROLOGUE(vp^.v_mount); - Result:=vop_add_writecount_t(c)(@a); - VFS_EPILOGUE(s); -end; - end. diff --git a/tools/vop_generator/vop_generator.lpr b/tools/vop_generator/vop_generator.lpr index 5fd5f52b..493f1a93 100644 --- a/tools/vop_generator/vop_generator.lpr +++ b/tools/vop_generator/vop_generator.lpr @@ -243,8 +243,15 @@ begin Case state of 0:begin //open Case Name of - 'vop_spare4':state:=2; //skip - 'vop_spare5':state:=2; //skip + 'vop_cachedlookup' :state:=2; //skip + 'vop_advise' :state:=2; //skip + 'vop_is_text' :state:=2; //skip + 'vop_set_text' :state:=2; //skip + 'vop_unset_text' :state:=2; //skip + 'vop_get_writecount':state:=2; //skip + 'vop_add_writecount':state:=2; //skip + 'vop_spare4' :state:=2; //skip + 'vop_spare5' :state:=2; //skip else begin Enum:=TEnum.Create;