Date: Fri, 13 Jan 2012 18:54:10 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r230068 - in stable/8/sys: kern sys Message-ID: <201201131854.q0DIsAGX074869@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Jan 13 18:54:10 2012 New Revision: 230068 URL: http://svn.freebsd.org/changeset/base/230068 Log: MFC 228849, 229727: Add post-VOP hooks for VOP_DELETEEXTATTR() and VOP_SETEXTATTR() and use these to trigger a NOTE_ATTRIB EVFILT_VNODE kevent when the extended attributes of a vnode are changed. Modified: stable/8/sys/kern/vfs_subr.c stable/8/sys/kern/vnode_if.src stable/8/sys/sys/vnode.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/vfs_subr.c ============================================================================== --- stable/8/sys/kern/vfs_subr.c Fri Jan 13 18:53:48 2012 (r230067) +++ stable/8/sys/kern/vfs_subr.c Fri Jan 13 18:54:10 2012 (r230068) @@ -4003,6 +4003,15 @@ vop_create_post(void *ap, int rc) } void +vop_deleteextattr_post(void *ap, int rc) +{ + struct vop_deleteextattr_args *a = ap; + + if (!rc) + VFS_KNOTE_LOCKED(a->a_vp, NOTE_ATTRIB); +} + +void vop_link_post(void *ap, int rc) { struct vop_link_args *a = ap; @@ -4084,6 +4093,15 @@ vop_setattr_post(void *ap, int rc) } void +vop_setextattr_post(void *ap, int rc) +{ + struct vop_setextattr_args *a = ap; + + if (!rc) + VFS_KNOTE_LOCKED(a->a_vp, NOTE_ATTRIB); +} + +void vop_symlink_post(void *ap, int rc) { struct vop_symlink_args *a = ap; Modified: stable/8/sys/kern/vnode_if.src ============================================================================== --- stable/8/sys/kern/vnode_if.src Fri Jan 13 18:53:48 2012 (r230067) +++ stable/8/sys/kern/vnode_if.src Fri Jan 13 18:54:10 2012 (r230068) @@ -562,6 +562,7 @@ vop_openextattr { %% deleteextattr vp E E E +%! deleteextattr post vop_deleteextattr_post vop_deleteextattr { IN struct vnode *vp; @@ -573,6 +574,7 @@ vop_deleteextattr { %% setextattr vp E E E +%! setextattr post vop_setextattr_post vop_setextattr { IN struct vnode *vp; Modified: stable/8/sys/sys/vnode.h ============================================================================== --- stable/8/sys/sys/vnode.h Fri Jan 13 18:53:48 2012 (r230067) +++ stable/8/sys/sys/vnode.h Fri Jan 13 18:54:10 2012 (r230068) @@ -705,6 +705,7 @@ int vop_panic(struct vop_generic_args *a /* These are called from within the actual VOPS. */ void vop_create_post(void *a, int rc); +void vop_deleteextattr_post(void *a, int rc); void vop_link_post(void *a, int rc); void vop_lock_pre(void *a); void vop_lock_post(void *a, int rc); @@ -717,6 +718,7 @@ void vop_rename_post(void *a, int rc); void vop_rename_pre(void *a); void vop_rmdir_post(void *a, int rc); void vop_setattr_post(void *a, int rc); +void vop_setextattr_post(void *a, int rc); void vop_strategy_pre(void *a); void vop_symlink_post(void *a, int rc); void vop_unlock_post(void *a, int rc);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201131854.q0DIsAGX074869>