Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern.
This commit is contained in:
parent
b1cb363c11
commit
d7f6cbf8bc
|
@ -1,13 +1,13 @@
|
|||
/* $NetBSD: vnode_if.c,v 1.45 2003/08/07 16:32:05 agc Exp $ */
|
||||
/* $NetBSD: vnode_if.c,v 1.46 2004/01/25 18:02:04 hannken Exp $ */
|
||||
|
||||
/*
|
||||
* Warning: This file is generated automatically.
|
||||
* (Modifications made here may easily be lost!)
|
||||
*
|
||||
* Created from the file:
|
||||
* NetBSD: vnode_if.src,v 1.33 2003/04/10 20:35:36 jdolecek Exp
|
||||
* NetBSD: vnode_if.src,v 1.37 2004/01/24 01:40:57 wiz Exp
|
||||
* by the script:
|
||||
* NetBSD: vnode_if.sh,v 1.30 2001/11/12 14:34:24 lukem Exp
|
||||
* NetBSD: vnode_if.sh,v 1.33 2003/08/07 16:32:05 agc Exp
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.45 2003/08/07 16:32:05 agc Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.46 2004/01/25 18:02:04 hannken Exp $");
|
||||
|
||||
|
||||
/*
|
||||
|
@ -73,37 +73,11 @@ const struct vnodeop_desc vop_default_desc = {
|
|||
|
||||
/* Special cases: */
|
||||
|
||||
const int vop_strategy_vp_offsets[] = {
|
||||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_strategy_desc = {
|
||||
1,
|
||||
"vop_strategy",
|
||||
0,
|
||||
vop_strategy_vp_offsets,
|
||||
VDESC_NO_OFFSET,
|
||||
VDESC_NO_OFFSET,
|
||||
VDESC_NO_OFFSET,
|
||||
VDESC_NO_OFFSET,
|
||||
NULL,
|
||||
};
|
||||
#ifdef VNODE_OP_NOINLINE
|
||||
int
|
||||
VOP_STRATEGY(bp)
|
||||
struct buf *bp;
|
||||
{
|
||||
struct vop_strategy_args a;
|
||||
a.a_desc = VDESC(vop_strategy);
|
||||
a.a_bp = bp;
|
||||
return (VCALL(bp->b_vp, VOFFSET(vop_strategy), &a));
|
||||
}
|
||||
#endif
|
||||
|
||||
const int vop_bwrite_vp_offsets[] = {
|
||||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_bwrite_desc = {
|
||||
2,
|
||||
1,
|
||||
"vop_bwrite",
|
||||
0,
|
||||
vop_bwrite_vp_offsets,
|
||||
|
@ -132,7 +106,7 @@ const int vop_lookup_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_lookup_desc = {
|
||||
3,
|
||||
2,
|
||||
"vop_lookup",
|
||||
0,
|
||||
vop_lookup_vp_offsets,
|
||||
|
@ -163,7 +137,7 @@ const int vop_create_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_create_desc = {
|
||||
4,
|
||||
3,
|
||||
"vop_create",
|
||||
0 | VDESC_VP0_WILLPUT,
|
||||
vop_create_vp_offsets,
|
||||
|
@ -196,7 +170,7 @@ const int vop_mknod_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_mknod_desc = {
|
||||
5,
|
||||
4,
|
||||
"vop_mknod",
|
||||
0 | VDESC_VP0_WILLPUT,
|
||||
vop_mknod_vp_offsets,
|
||||
|
@ -229,7 +203,7 @@ const int vop_open_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_open_desc = {
|
||||
6,
|
||||
5,
|
||||
"vop_open",
|
||||
0,
|
||||
vop_open_vp_offsets,
|
||||
|
@ -262,7 +236,7 @@ const int vop_close_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_close_desc = {
|
||||
7,
|
||||
6,
|
||||
"vop_close",
|
||||
0,
|
||||
vop_close_vp_offsets,
|
||||
|
@ -295,7 +269,7 @@ const int vop_access_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_access_desc = {
|
||||
8,
|
||||
7,
|
||||
"vop_access",
|
||||
0,
|
||||
vop_access_vp_offsets,
|
||||
|
@ -328,7 +302,7 @@ const int vop_getattr_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_getattr_desc = {
|
||||
9,
|
||||
8,
|
||||
"vop_getattr",
|
||||
0,
|
||||
vop_getattr_vp_offsets,
|
||||
|
@ -361,7 +335,7 @@ const int vop_setattr_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_setattr_desc = {
|
||||
10,
|
||||
9,
|
||||
"vop_setattr",
|
||||
0,
|
||||
vop_setattr_vp_offsets,
|
||||
|
@ -394,7 +368,7 @@ const int vop_read_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_read_desc = {
|
||||
11,
|
||||
10,
|
||||
"vop_read",
|
||||
0,
|
||||
vop_read_vp_offsets,
|
||||
|
@ -427,7 +401,7 @@ const int vop_write_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_write_desc = {
|
||||
12,
|
||||
11,
|
||||
"vop_write",
|
||||
0,
|
||||
vop_write_vp_offsets,
|
||||
|
@ -460,7 +434,7 @@ const int vop_ioctl_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_ioctl_desc = {
|
||||
13,
|
||||
12,
|
||||
"vop_ioctl",
|
||||
0,
|
||||
vop_ioctl_vp_offsets,
|
||||
|
@ -497,7 +471,7 @@ const int vop_fcntl_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_fcntl_desc = {
|
||||
14,
|
||||
13,
|
||||
"vop_fcntl",
|
||||
0,
|
||||
vop_fcntl_vp_offsets,
|
||||
|
@ -534,7 +508,7 @@ const int vop_poll_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_poll_desc = {
|
||||
15,
|
||||
14,
|
||||
"vop_poll",
|
||||
0,
|
||||
vop_poll_vp_offsets,
|
||||
|
@ -565,7 +539,7 @@ const int vop_kqfilter_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_kqfilter_desc = {
|
||||
16,
|
||||
15,
|
||||
"vop_kqfilter",
|
||||
0,
|
||||
vop_kqfilter_vp_offsets,
|
||||
|
@ -594,7 +568,7 @@ const int vop_revoke_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_revoke_desc = {
|
||||
17,
|
||||
16,
|
||||
"vop_revoke",
|
||||
0,
|
||||
vop_revoke_vp_offsets,
|
||||
|
@ -623,7 +597,7 @@ const int vop_mmap_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_mmap_desc = {
|
||||
18,
|
||||
17,
|
||||
"vop_mmap",
|
||||
0,
|
||||
vop_mmap_vp_offsets,
|
||||
|
@ -656,7 +630,7 @@ const int vop_fsync_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_fsync_desc = {
|
||||
19,
|
||||
18,
|
||||
"vop_fsync",
|
||||
0,
|
||||
vop_fsync_vp_offsets,
|
||||
|
@ -693,7 +667,7 @@ const int vop_seek_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_seek_desc = {
|
||||
20,
|
||||
19,
|
||||
"vop_seek",
|
||||
0,
|
||||
vop_seek_vp_offsets,
|
||||
|
@ -727,7 +701,7 @@ const int vop_remove_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_remove_desc = {
|
||||
21,
|
||||
20,
|
||||
"vop_remove",
|
||||
0 | VDESC_VP0_WILLPUT | VDESC_VP1_WILLPUT,
|
||||
vop_remove_vp_offsets,
|
||||
|
@ -759,7 +733,7 @@ const int vop_link_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_link_desc = {
|
||||
22,
|
||||
21,
|
||||
"vop_link",
|
||||
0 | VDESC_VP0_WILLPUT,
|
||||
vop_link_vp_offsets,
|
||||
|
@ -793,7 +767,7 @@ const int vop_rename_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_rename_desc = {
|
||||
23,
|
||||
22,
|
||||
"vop_rename",
|
||||
0 | VDESC_VP0_WILLRELE | VDESC_VP1_WILLRELE | VDESC_VP2_WILLPUT | VDESC_VP3_WILLPUT,
|
||||
vop_rename_vp_offsets,
|
||||
|
@ -830,7 +804,7 @@ const int vop_mkdir_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_mkdir_desc = {
|
||||
24,
|
||||
23,
|
||||
"vop_mkdir",
|
||||
0 | VDESC_VP0_WILLPUT,
|
||||
vop_mkdir_vp_offsets,
|
||||
|
@ -864,7 +838,7 @@ const int vop_rmdir_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_rmdir_desc = {
|
||||
25,
|
||||
24,
|
||||
"vop_rmdir",
|
||||
0 | VDESC_VP0_WILLPUT | VDESC_VP1_WILLPUT,
|
||||
vop_rmdir_vp_offsets,
|
||||
|
@ -895,7 +869,7 @@ const int vop_symlink_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_symlink_desc = {
|
||||
26,
|
||||
25,
|
||||
"vop_symlink",
|
||||
0 | VDESC_VP0_WILLPUT,
|
||||
vop_symlink_vp_offsets,
|
||||
|
@ -930,7 +904,7 @@ const int vop_readdir_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_readdir_desc = {
|
||||
27,
|
||||
26,
|
||||
"vop_readdir",
|
||||
0,
|
||||
vop_readdir_vp_offsets,
|
||||
|
@ -967,7 +941,7 @@ const int vop_readlink_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_readlink_desc = {
|
||||
28,
|
||||
27,
|
||||
"vop_readlink",
|
||||
0,
|
||||
vop_readlink_vp_offsets,
|
||||
|
@ -998,7 +972,7 @@ const int vop_abortop_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_abortop_desc = {
|
||||
29,
|
||||
28,
|
||||
"vop_abortop",
|
||||
0,
|
||||
vop_abortop_vp_offsets,
|
||||
|
@ -1027,7 +1001,7 @@ const int vop_inactive_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_inactive_desc = {
|
||||
30,
|
||||
29,
|
||||
"vop_inactive",
|
||||
0 | VDESC_VP0_WILLUNLOCK,
|
||||
vop_inactive_vp_offsets,
|
||||
|
@ -1056,7 +1030,7 @@ const int vop_reclaim_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_reclaim_desc = {
|
||||
31,
|
||||
30,
|
||||
"vop_reclaim",
|
||||
0,
|
||||
vop_reclaim_vp_offsets,
|
||||
|
@ -1085,7 +1059,7 @@ const int vop_lock_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_lock_desc = {
|
||||
32,
|
||||
31,
|
||||
"vop_lock",
|
||||
0,
|
||||
vop_lock_vp_offsets,
|
||||
|
@ -1114,7 +1088,7 @@ const int vop_unlock_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_unlock_desc = {
|
||||
33,
|
||||
32,
|
||||
"vop_unlock",
|
||||
0,
|
||||
vop_unlock_vp_offsets,
|
||||
|
@ -1143,7 +1117,7 @@ const int vop_bmap_vp_offsets[] = {
|
|||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_bmap_desc = {
|
||||
34,
|
||||
33,
|
||||
"vop_bmap",
|
||||
0,
|
||||
vop_bmap_vp_offsets,
|
||||
|
@ -1173,6 +1147,35 @@ VOP_BMAP(vp, bn, vpp, bnp, runp)
|
|||
}
|
||||
#endif
|
||||
|
||||
const int vop_strategy_vp_offsets[] = {
|
||||
VOPARG_OFFSETOF(struct vop_strategy_args,a_vp),
|
||||
VDESC_NO_OFFSET
|
||||
};
|
||||
const struct vnodeop_desc vop_strategy_desc = {
|
||||
34,
|
||||
"vop_strategy",
|
||||
0,
|
||||
vop_strategy_vp_offsets,
|
||||
VDESC_NO_OFFSET,
|
||||
VDESC_NO_OFFSET,
|
||||
VDESC_NO_OFFSET,
|
||||
VDESC_NO_OFFSET,
|
||||
NULL,
|
||||
};
|
||||
#ifdef VNODE_OP_NOINLINE
|
||||
int
|
||||
VOP_STRATEGY(vp, bp)
|
||||
struct vnode *vp;
|
||||
struct buf *bp;
|
||||
{
|
||||
struct vop_strategy_args a;
|
||||
a.a_desc = VDESC(vop_strategy);
|
||||
a.a_vp = vp;
|
||||
a.a_bp = bp;
|
||||
return (VCALL(vp, VOFFSET(vop_strategy), &a));
|
||||
}
|
||||
#endif
|
||||
|
||||
const int vop_print_vp_offsets[] = {
|
||||
VOPARG_OFFSETOF(struct vop_print_args,a_vp),
|
||||
VDESC_NO_OFFSET
|
||||
|
@ -1666,7 +1669,6 @@ VOP_PUTPAGES(vp, offlo, offhi, flags)
|
|||
|
||||
const struct vnodeop_desc * const vfs_op_descs[] = {
|
||||
&vop_default_desc, /* MUST BE FIRST */
|
||||
&vop_strategy_desc, /* XXX: SPECIAL CASE */
|
||||
&vop_bwrite_desc, /* XXX: SPECIAL CASE */
|
||||
|
||||
&vop_lookup_desc,
|
||||
|
@ -1701,6 +1703,7 @@ const struct vnodeop_desc * const vfs_op_descs[] = {
|
|||
&vop_lock_desc,
|
||||
&vop_unlock_desc,
|
||||
&vop_bmap_desc,
|
||||
&vop_strategy_desc,
|
||||
&vop_print_desc,
|
||||
&vop_islocked_desc,
|
||||
&vop_pathconf_desc,
|
||||
|
|
|
@ -29,7 +29,7 @@ copyright="\
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
"
|
||||
SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.33 2003/08/07 16:32:05 agc Exp $'
|
||||
SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.34 2004/01/25 18:02:04 hannken Exp $'
|
||||
|
||||
# Script to produce VFS front-end sugar.
|
||||
#
|
||||
|
@ -236,8 +236,6 @@ END {
|
|||
argtype[0]="struct buf *";
|
||||
argname[0]="bp";
|
||||
arg0special="->b_vp";
|
||||
name="vop_strategy";
|
||||
doit();
|
||||
name="vop_bwrite";
|
||||
doit();
|
||||
|
||||
|
@ -390,8 +388,6 @@ BEGIN {
|
|||
argname[0]="bp";
|
||||
arg0special="->b_vp";
|
||||
willrele[0]=0;
|
||||
name="vop_strategy";
|
||||
doit();
|
||||
name="vop_bwrite";
|
||||
doit();
|
||||
printf("\n/* End of special cases */\n");
|
||||
|
@ -409,7 +405,6 @@ echo '
|
|||
echo '
|
||||
const struct vnodeop_desc * const vfs_op_descs[] = {
|
||||
&vop_default_desc, /* MUST BE FIRST */
|
||||
&vop_strategy_desc, /* XXX: SPECIAL CASE */
|
||||
&vop_bwrite_desc, /* XXX: SPECIAL CASE */
|
||||
'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: vnode_if.src,v 1.37 2004/01/24 01:40:57 wiz Exp $
|
||||
# $NetBSD: vnode_if.src,v 1.38 2004/01/25 18:02:04 hannken Exp $
|
||||
#
|
||||
# Copyright (c) 1992, 1993
|
||||
# The Regents of the University of California. All rights reserved.
|
||||
|
@ -434,11 +434,12 @@ vop_bmap {
|
|||
};
|
||||
|
||||
#
|
||||
# Needs work: no vp?
|
||||
#% strategy vp = = =
|
||||
#
|
||||
#vop_strategy {
|
||||
# IN struct buf *bp;
|
||||
#};
|
||||
vop_strategy {
|
||||
IN struct vnode *vp;
|
||||
IN struct buf *bp;
|
||||
};
|
||||
|
||||
#
|
||||
#% print vp = = =
|
||||
|
|
Loading…
Reference in New Issue