Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpvfs add advlock to rumpfs, ok pooka@



details:   https://anonhg.NetBSD.org/src/rev/3d6c443f2765
branches:  trunk
changeset: 760713:3d6c443f2765
user:      kefren <kefren%NetBSD.org@localhost>
date:      Tue Jan 11 14:05:32 2011 +0000

description:
add advlock to rumpfs, ok pooka@

diffstat:

 sys/rump/librump/rumpvfs/rumpfs.c |  24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diffs (66 lines):

diff -r b064fe3470e8 -r 3d6c443f2765 sys/rump/librump/rumpvfs/rumpfs.c
--- a/sys/rump/librump/rumpvfs/rumpfs.c Tue Jan 11 14:04:54 2011 +0000
+++ b/sys/rump/librump/rumpvfs/rumpfs.c Tue Jan 11 14:05:32 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpfs.c,v 1.81 2011/01/04 09:49:16 pooka Exp $        */
+/*     $NetBSD: rumpfs.c,v 1.82 2011/01/11 14:05:32 kefren Exp $       */
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.81 2011/01/04 09:49:16 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.82 2011/01/11 14:05:32 kefren Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -82,6 +82,7 @@
 static int rump_vop_pathconf(void *);
 static int rump_vop_bmap(void *);
 static int rump_vop_strategy(void *);
+static int rump_vop_advlock(void *);
 
 int (**fifo_vnodeop_p)(void *);
 const struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
@@ -124,6 +125,7 @@
        { &vop_pathconf_desc, rump_vop_pathconf },
        { &vop_bmap_desc, rump_vop_bmap },
        { &vop_strategy_desc, rump_vop_strategy },
+       { &vop_advlock_desc, rump_vop_advlock },
        { NULL, NULL }
 };
 const struct vnodeopv_desc rump_vnodeop_opv_desc =
@@ -168,6 +170,7 @@
        struct vnode *rn_vp;
        char *rn_hostpath;
        int rn_flags;
+       struct lockf *rn_lockf;
 
        union {
                struct {                /* VREG */
@@ -1478,6 +1481,23 @@
        return VOCALL(opvec, ap->a_desc->vdesc_offset, v);
 }
 
+static int
+rump_vop_advlock(void *v)
+{
+       struct vop_advlock_args /* {
+               const struct vnodeop_desc *a_desc;
+               struct vnode *a_vp;
+               void *a_id;
+               int a_op;
+               struct flock *a_fl;
+               int a_flags;
+       } */ *ap = v;
+       struct vnode *vp = ap->a_vp;
+       struct rumpfs_node *rn = vp->v_data;
+
+       return lf_advlock(ap, &rn->rn_lockf, vp->v_size);
+}
+
 /*
  * Begin vfs-level stuff
  */



Home | Main Index | Thread Index | Old Index