Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/smbfs add genfsops necessary for genfs_*{get|put}page...



details:   https://anonhg.NetBSD.org/src/rev/90b6c866506d
branches:  trunk
changeset: 543356:90b6c866506d
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Feb 23 21:55:20 2003 +0000

description:
add genfsops necessary for genfs_*{get|put}pages() to actually work
use 'compat' getpages and gop_write - smbfs doesn't have bmap vnode op (yet)

diffstat:

 sys/fs/smbfs/smbfs_node.c  |  9 ++++++++-
 sys/fs/smbfs/smbfs_node.h  |  5 ++++-
 sys/fs/smbfs/smbfs_vnops.c |  4 ++--
 3 files changed, 14 insertions(+), 4 deletions(-)

diffs (74 lines):

diff -r 39dc2597ff17 -r 90b6c866506d sys/fs/smbfs/smbfs_node.c
--- a/sys/fs/smbfs/smbfs_node.c Sun Feb 23 21:54:05 2003 +0000
+++ b/sys/fs/smbfs/smbfs_node.c Sun Feb 23 21:55:20 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smbfs_node.c,v 1.7 2003/02/23 21:33:06 jdolecek Exp $  */
+/*     $NetBSD: smbfs_node.c,v 1.8 2003/02/23 21:55:20 jdolecek Exp $  */
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -66,6 +66,12 @@
 
 extern int (**smbfs_vnodeop_p) __P((void *));
 
+static struct genfs_ops smbfs_genfsops = {
+       NULL,
+       NULL,
+       genfs_compat_gop_write,
+};
+
 #if 0
 static int smbfs_hashprint(struct mount *mp);
 
@@ -225,6 +231,7 @@
        LIST_INSERT_HEAD(nhpp, np, n_hash);
        smbfs_hash_unlock(smp);
 
+       genfs_node_init(vp, &smbfs_genfsops);
        uvm_vnp_setsize(vp, np->n_size);
        *vpp = vp;
        return 0;
diff -r 39dc2597ff17 -r 90b6c866506d sys/fs/smbfs/smbfs_node.h
--- a/sys/fs/smbfs/smbfs_node.h Sun Feb 23 21:54:05 2003 +0000
+++ b/sys/fs/smbfs/smbfs_node.h Sun Feb 23 21:55:20 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smbfs_node.h,v 1.4 2003/02/18 20:09:01 jdolecek Exp $  */
+/*     $NetBSD: smbfs_node.h,v 1.5 2003/02/23 21:55:20 jdolecek Exp $  */
 
 /*
  * Copyright (c) 2000-2001, Boris Popov
@@ -36,6 +36,8 @@
 #ifndef _FS_SMBFS_NODE_H_
 #define _FS_SMBFS_NODE_H_
 
+#include <miscfs/genfs/genfs_node.h>   /* for struct genfs_node */
+
 #define        SMBFS_ROOT_INO          2       /* just like in UFS */
 
 /* Bits for smbnode.n_flag */
@@ -48,6 +50,7 @@
 struct smbfs_fctx;
 
 struct smbnode {
+       struct genfs_node       n_gnode;
        int                     n_flag;
        struct smbnode *        n_parent;
        struct vnode *          n_vnode;
diff -r 39dc2597ff17 -r 90b6c866506d sys/fs/smbfs/smbfs_vnops.c
--- a/sys/fs/smbfs/smbfs_vnops.c        Sun Feb 23 21:54:05 2003 +0000
+++ b/sys/fs/smbfs/smbfs_vnops.c        Sun Feb 23 21:55:20 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smbfs_vnops.c,v 1.9 2003/02/23 21:54:05 jdolecek Exp $ */
+/*     $NetBSD: smbfs_vnops.c,v 1.10 2003/02/23 21:55:20 jdolecek Exp $        */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
        { &vop_create_desc,             smbfs_create },
        { &vop_fsync_desc,              smbfs_fsync },
        { &vop_getattr_desc,            smbfs_getattr },
-       { &vop_getpages_desc,           genfs_getpages },
+       { &vop_getpages_desc,           genfs_compat_getpages },
        { &vop_inactive_desc,           smbfs_inactive },
        { &vop_ioctl_desc,              genfs_enoioctl },
        { &vop_islocked_desc,           genfs_noislocked },



Home | Main Index | Thread Index | Old Index