From e1657bbb97c9e735f50385ec8d7decd02dbe6ab3 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Thu, 5 Sep 2002 20:56:14 +0000 Subject: [PATCH] Introduce the VOP_OPENEXTATTR() and VOP_CLOSEEXTATTR() methods. Together these two implement a simple transcation style grouping for modifications of extended attributes on a vnode. VOP_CLOSEEXTATTR() takes a boolean "commit" argument, which determines if the aggregate changes are attempted written or not. A commit will fail if any of the VOP_SETEXTATTR() calls since the VOP_OPENEXTATTR() have failed to meet their objective or if the flush to disk fails. The default operations for these two VOP's is to return EOPNOTSUPP. This API may still be subject to change. Sponsored by: DARPA & NAI Labs --- sys/kern/vnode_if.src | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index 8971627c207..320205849af 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -512,6 +512,16 @@ vop_aclcheck { IN struct thread *td; }; +# +#% closeextattr vp L L L +# +vop_closeextattr { + IN struct vnode *vp; + IN int commit; + IN struct ucred *cred; + IN struct thread *td; +}; + # #% getextattr vp L L L # @@ -525,6 +535,15 @@ vop_getextattr { IN struct thread *td; }; +# +#% openextattr vp L L L +# +vop_openextattr { + IN struct vnode *vp; + IN struct ucred *cred; + IN struct thread *td; +}; + # #% setextattr vp L L L #