svn commit: r230067 - in stable/9/sys: kern sys
John Baldwin
jhb at FreeBSD.org
Fri Jan 13 18:53:49 UTC 2012
Author: jhb
Date: Fri Jan 13 18:53:48 2012
New Revision: 230067
URL: http://svn.freebsd.org/changeset/base/230067
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/9/sys/kern/vfs_subr.c
stable/9/sys/kern/vnode_if.src
stable/9/sys/sys/vnode.h
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/amd64/include/xen/ (props changed)
stable/9/sys/boot/ (props changed)
stable/9/sys/boot/i386/efi/ (props changed)
stable/9/sys/boot/ia64/efi/ (props changed)
stable/9/sys/boot/ia64/ski/ (props changed)
stable/9/sys/boot/powerpc/boot1.chrp/ (props changed)
stable/9/sys/boot/powerpc/ofw/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
stable/9/sys/conf/ (props changed)
stable/9/sys/contrib/dev/acpica/ (props changed)
stable/9/sys/contrib/octeon-sdk/ (props changed)
stable/9/sys/contrib/pf/ (props changed)
stable/9/sys/contrib/x86emu/ (props changed)
Modified: stable/9/sys/kern/vfs_subr.c
==============================================================================
--- stable/9/sys/kern/vfs_subr.c Fri Jan 13 18:49:28 2012 (r230066)
+++ stable/9/sys/kern/vfs_subr.c Fri Jan 13 18:53:48 2012 (r230067)
@@ -4033,6 +4033,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;
@@ -4114,6 +4123,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/9/sys/kern/vnode_if.src
==============================================================================
--- stable/9/sys/kern/vnode_if.src Fri Jan 13 18:49:28 2012 (r230066)
+++ stable/9/sys/kern/vnode_if.src Fri Jan 13 18:53:48 2012 (r230067)
@@ -569,6 +569,7 @@ vop_openextattr {
%% deleteextattr vp E E E
+%! deleteextattr post vop_deleteextattr_post
vop_deleteextattr {
IN struct vnode *vp;
@@ -580,6 +581,7 @@ vop_deleteextattr {
%% setextattr vp E E E
+%! setextattr post vop_setextattr_post
vop_setextattr {
IN struct vnode *vp;
Modified: stable/9/sys/sys/vnode.h
==============================================================================
--- stable/9/sys/sys/vnode.h Fri Jan 13 18:49:28 2012 (r230066)
+++ stable/9/sys/sys/vnode.h Fri Jan 13 18:53:48 2012 (r230067)
@@ -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);
More information about the svn-src-stable-9
mailing list