Add VOP_ADVLOCKPURGE so that the file system is called when purging

locks (in the case where the VFS impl isn't using lf_*)

Submitted by:       Matthew Fleming <matthew.fleming@isilon.com>
Reviewed by:        zml, dfr
This commit is contained in:
Zachary Loafman 2010-05-12 21:24:46 +00:00
parent e409c5c823
commit 7fd32ea923
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208003
4 changed files with 20 additions and 1 deletions

View file

@ -98,6 +98,7 @@ struct vop_vector default_vnodeops = {
.vop_accessx = vop_stdaccessx,
.vop_advlock = vop_stdadvlock,
.vop_advlockasync = vop_stdadvlockasync,
.vop_advlockpurge = vop_stdadvlockpurge,
.vop_bmap = vop_stdbmap,
.vop_close = VOP_NULL,
.vop_fsync = VOP_NULL,
@ -413,6 +414,16 @@ vop_stdadvlockasync(struct vop_advlockasync_args *ap)
return (lf_advlockasync(ap, &(vp->v_lockf), vattr.va_size));
}
int
vop_stdadvlockpurge(struct vop_advlockpurge_args *ap)
{
struct vnode *vp;
vp = ap->a_vp;
lf_purgelocks(vp, &vp->v_lockf);
return (0);
}
/*
* vop_stdpathconf:
*

View file

@ -2585,7 +2585,7 @@ vgonel(struct vnode *vp)
/*
* Clear the advisory locks and wake up waiting threads.
*/
lf_purgelocks(vp, &(vp->v_lockf));
(void)VOP_ADVLOCKPURGE(vp);
/*
* Delete from old mount point vnode list.
*/

View file

@ -453,6 +453,13 @@ vop_advlockasync {
};
%% advlockpurge vp E E E
vop_advlockpurge {
IN struct vnode *vp;
};
%% reallocblks vp E E E
vop_reallocblks {

View file

@ -692,6 +692,7 @@ int vop_stdaccess(struct vop_access_args *ap);
int vop_stdaccessx(struct vop_accessx_args *ap);
int vop_stdadvlock(struct vop_advlock_args *ap);
int vop_stdadvlockasync(struct vop_advlockasync_args *ap);
int vop_stdadvlockpurge(struct vop_advlockpurge_args *ap);
int vop_stdpathconf(struct vop_pathconf_args *);
int vop_stdpoll(struct vop_poll_args *);
int vop_stdvptocnp(struct vop_vptocnp_args *ap);