Source-Changes-HG archive

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

[src/trunk]: src/sys make vfs_getnewfsid only take one argument and fetch the...



details:   https://anonhg.NetBSD.org/src/rev/cf85d1a02bcb
branches:  trunk
changeset: 487646:cf85d1a02bcb
user:      assar <assar%NetBSD.org@localhost>
date:      Sat Jun 10 18:27:01 2000 +0000

description:
make vfs_getnewfsid only take one argument and fetch the name of the
filesystem from the supplied mount argument.  also make makefstype
take a const parameter.  update all the callers.

diffstat:

 sys/kern/vfs_subr.c                 |  9 ++++-----
 sys/miscfs/fdesc/fdesc_vfsops.c     |  4 ++--
 sys/miscfs/kernfs/kernfs_vfsops.c   |  4 ++--
 sys/miscfs/nullfs/null_vfsops.c     |  4 ++--
 sys/miscfs/overlay/overlay_vfsops.c |  4 ++--
 sys/miscfs/portal/portal_vfsops.c   |  4 ++--
 sys/miscfs/procfs/procfs_vfsops.c   |  4 ++--
 sys/miscfs/umapfs/umap_vfsops.c     |  4 ++--
 sys/miscfs/union/union_vfsops.c     |  4 ++--
 sys/nfs/nfs_vfsops.c                |  4 ++--
 sys/sys/mount.h                     |  4 ++--
 sys/sys/vnode.h                     |  4 ++--
 12 files changed, 26 insertions(+), 27 deletions(-)

diffs (235 lines):

diff -r e99caa48642f -r cf85d1a02bcb sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c       Sat Jun 10 18:17:18 2000 +0000
+++ b/sys/kern/vfs_subr.c       Sat Jun 10 18:27:01 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_subr.c,v 1.126 2000/05/28 04:13:56 mycroft Exp $   */
+/*     $NetBSD: vfs_subr.c,v 1.127 2000/06/10 18:27:01 assar Exp $     */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -326,16 +326,15 @@
  * Get a new unique fsid
  */
 void
-vfs_getnewfsid(mp, fstypename)
+vfs_getnewfsid(mp)
        struct mount *mp;
-       char *fstypename;
 {
        static u_short xxxfs_mntid;
        fsid_t tfsid;
        int mtype;
 
        simple_lock(&mntid_slock);
-       mtype = makefstype(fstypename);
+       mtype = makefstype(mp->mnt_op->vfs_name);
        mp->mnt_stat.f_fsid.val[0] = makedev(nblkdev + mtype, 0);
        mp->mnt_stat.f_fsid.val[1] = mtype;
        if (xxxfs_mntid == 0)
@@ -357,7 +356,7 @@
  */
 long
 makefstype(type)
-       char *type;
+       const char *type;
 {
        long rv;
 
diff -r e99caa48642f -r cf85d1a02bcb sys/miscfs/fdesc/fdesc_vfsops.c
--- a/sys/miscfs/fdesc/fdesc_vfsops.c   Sat Jun 10 18:17:18 2000 +0000
+++ b/sys/miscfs/fdesc/fdesc_vfsops.c   Sat Jun 10 18:27:01 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fdesc_vfsops.c,v 1.30 2000/03/30 02:16:22 simonb Exp $ */
+/*     $NetBSD: fdesc_vfsops.c,v 1.31 2000/06/10 18:27:02 assar Exp $  */
 
 /*
  * Copyright (c) 1992, 1993, 1995
@@ -110,7 +110,7 @@
        fmp->f_root = rvp;
        mp->mnt_flag |= MNT_LOCAL;
        mp->mnt_data = (qaddr_t)fmp;
-       vfs_getnewfsid(mp, MOUNT_FDESC);
+       vfs_getnewfsid(mp);
 
        (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size);
        memset(mp->mnt_stat.f_mntonname + size, 0, MNAMELEN - size);
diff -r e99caa48642f -r cf85d1a02bcb sys/miscfs/kernfs/kernfs_vfsops.c
--- a/sys/miscfs/kernfs/kernfs_vfsops.c Sat Jun 10 18:17:18 2000 +0000
+++ b/sys/miscfs/kernfs/kernfs_vfsops.c Sat Jun 10 18:27:01 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kernfs_vfsops.c,v 1.36 2000/03/16 18:08:25 jdolecek Exp $      */
+/*     $NetBSD: kernfs_vfsops.c,v 1.37 2000/06/10 18:27:03 assar Exp $ */
 
 /*
  * Copyright (c) 1992, 1993, 1995
@@ -154,7 +154,7 @@
        fmp->kf_root = rvp;
        mp->mnt_flag |= MNT_LOCAL;
        mp->mnt_data = (qaddr_t)fmp;
-       vfs_getnewfsid(mp, MOUNT_KERNFS);
+       vfs_getnewfsid(mp);
 
        (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size);
        memset(mp->mnt_stat.f_mntonname + size, 0, MNAMELEN - size);
diff -r e99caa48642f -r cf85d1a02bcb sys/miscfs/nullfs/null_vfsops.c
--- a/sys/miscfs/nullfs/null_vfsops.c   Sat Jun 10 18:17:18 2000 +0000
+++ b/sys/miscfs/nullfs/null_vfsops.c   Sat Jun 10 18:27:01 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: null_vfsops.c,v 1.26 2000/03/16 19:00:26 jdolecek Exp $        */
+/*     $NetBSD: null_vfsops.c,v 1.27 2000/06/10 18:27:03 assar Exp $   */
 
 /*
  * Copyright (c) 1999 National Aeronautics & Space Administration
@@ -168,7 +168,7 @@
         * Make sure that the mount point is sufficiently initialized
         * that the node create call will work.
         */
-       vfs_getnewfsid(mp, MOUNT_NULL);
+       vfs_getnewfsid(mp);
 
        nmp->nullm_size = sizeof (struct null_node);
        nmp->nullm_tag = VT_NULL;
diff -r e99caa48642f -r cf85d1a02bcb sys/miscfs/overlay/overlay_vfsops.c
--- a/sys/miscfs/overlay/overlay_vfsops.c       Sat Jun 10 18:17:18 2000 +0000
+++ b/sys/miscfs/overlay/overlay_vfsops.c       Sat Jun 10 18:27:01 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: overlay_vfsops.c,v 1.3 2000/03/16 18:08:25 jdolecek Exp $      */
+/*     $NetBSD: overlay_vfsops.c,v 1.4 2000/06/10 18:27:03 assar Exp $ */
 
 /*
  * Copyright (c) 1999, 2000 National Aeronautics & Space Administration
@@ -159,7 +159,7 @@
         * Make sure that the mount point is sufficiently initialized
         * that the node create call will work.
         */
-       vfs_getnewfsid(mp, MOUNT_OVERLAY);
+       vfs_getnewfsid(mp);
 
        nmp->ovm_size = sizeof (struct overlay_node);
        nmp->ovm_tag = VT_OVERLAY;
diff -r e99caa48642f -r cf85d1a02bcb sys/miscfs/portal/portal_vfsops.c
--- a/sys/miscfs/portal/portal_vfsops.c Sat Jun 10 18:17:18 2000 +0000
+++ b/sys/miscfs/portal/portal_vfsops.c Sat Jun 10 18:27:01 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: portal_vfsops.c,v 1.23 2000/03/16 18:08:25 jdolecek Exp $      */
+/*     $NetBSD: portal_vfsops.c,v 1.24 2000/06/10 18:27:03 assar Exp $ */
 
 /*
  * Copyright (c) 1992, 1993, 1995
@@ -150,7 +150,7 @@
 
        mp->mnt_flag |= MNT_LOCAL;
        mp->mnt_data = (qaddr_t)fmp;
-       vfs_getnewfsid(mp, MOUNT_PORTAL);
+       vfs_getnewfsid(mp);
 
        (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size);
        memset(mp->mnt_stat.f_mntonname + size, 0, MNAMELEN - size);
diff -r e99caa48642f -r cf85d1a02bcb sys/miscfs/procfs/procfs_vfsops.c
--- a/sys/miscfs/procfs/procfs_vfsops.c Sat Jun 10 18:17:18 2000 +0000
+++ b/sys/miscfs/procfs/procfs_vfsops.c Sat Jun 10 18:27:01 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: procfs_vfsops.c,v 1.33 2000/03/16 18:08:27 jdolecek Exp $      */
+/*     $NetBSD: procfs_vfsops.c,v 1.34 2000/06/10 18:27:03 assar Exp $ */
 
 /*
  * Copyright (c) 1993 Jan-Simon Pendry
@@ -108,7 +108,7 @@
            M_UFSMNT, M_WAITOK);   /* XXX need new malloc type */
 
        mp->mnt_data = (qaddr_t)pmnt;
-       vfs_getnewfsid(mp, MOUNT_PROCFS);
+       vfs_getnewfsid(mp);
 
        (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN, &size);
        memset(mp->mnt_stat.f_mntonname + size, 0, MNAMELEN - size);
diff -r e99caa48642f -r cf85d1a02bcb sys/miscfs/umapfs/umap_vfsops.c
--- a/sys/miscfs/umapfs/umap_vfsops.c   Sat Jun 10 18:17:18 2000 +0000
+++ b/sys/miscfs/umapfs/umap_vfsops.c   Sat Jun 10 18:27:01 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: umap_vfsops.c,v 1.24 2000/03/16 19:00:26 jdolecek Exp $        */
+/*     $NetBSD: umap_vfsops.c,v 1.25 2000/06/10 18:27:04 assar Exp $   */
 
 /*
  * Copyright (c) 1992, 1993
@@ -181,7 +181,7 @@
         * Make sure the mount point's sufficiently initialized
         * that the node create call will work.
         */
-       vfs_getnewfsid(mp, MOUNT_UMAP);
+       vfs_getnewfsid(mp);
        amp->umapm_size = sizeof(struct umap_node);
        amp->umapm_tag = VT_UMAP;
        amp->umapm_bypass = umap_bypass;
diff -r e99caa48642f -r cf85d1a02bcb sys/miscfs/union/union_vfsops.c
--- a/sys/miscfs/union/union_vfsops.c   Sat Jun 10 18:17:18 2000 +0000
+++ b/sys/miscfs/union/union_vfsops.c   Sat Jun 10 18:27:01 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: union_vfsops.c,v 1.24 2000/03/16 18:08:27 jdolecek Exp $       */
+/*     $NetBSD: union_vfsops.c,v 1.25 2000/06/10 18:27:04 assar Exp $  */
 
 /*
  * Copyright (c) 1994 The Regents of the University of California.
@@ -216,7 +216,7 @@
        mp->mnt_flag |= (um->um_uppervp->v_mount->mnt_flag & MNT_RDONLY);
 
        mp->mnt_data = (qaddr_t)um;
-       vfs_getnewfsid(mp, MOUNT_UNION);
+       vfs_getnewfsid(mp);
 
        (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size);
        memset(mp->mnt_stat.f_mntonname + size, 0, MNAMELEN - size);
diff -r e99caa48642f -r cf85d1a02bcb sys/nfs/nfs_vfsops.c
--- a/sys/nfs/nfs_vfsops.c      Sat Jun 10 18:17:18 2000 +0000
+++ b/sys/nfs/nfs_vfsops.c      Sat Jun 10 18:27:01 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_vfsops.c,v 1.90 2000/05/07 01:38:36 tsarna Exp $   */
+/*     $NetBSD: nfs_vfsops.c,v 1.91 2000/06/10 18:27:04 assar Exp $    */
 
 /*
  * Copyright (c) 1989, 1993, 1995
@@ -636,7 +636,7 @@
                TAILQ_INIT(&nmp->nm_uidlruhead);
                TAILQ_INIT(&nmp->nm_bufq);
        }
-       vfs_getnewfsid(mp, MOUNT_NFS);
+       vfs_getnewfsid(mp);
        nmp->nm_mountp = mp;
 
        if (argp->flags & NFSMNT_NQNFS)
diff -r e99caa48642f -r cf85d1a02bcb sys/sys/mount.h
--- a/sys/sys/mount.h   Sat Jun 10 18:17:18 2000 +0000
+++ b/sys/sys/mount.h   Sat Jun 10 18:27:01 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mount.h,v 1.83 2000/05/03 14:53:15 ad Exp $    */
+/*     $NetBSD: mount.h,v 1.84 2000/06/10 18:27:04 assar Exp $ */
 
 /*
  * Copyright (c) 1989, 1991, 1993
@@ -438,7 +438,7 @@
 extern struct nfs_public nfs_pub;
 extern struct simplelock mountlist_slock;
 extern struct simplelock spechash_slock;
-long   makefstype __P((char *));
+long   makefstype __P((const char *));
 int    dounmount __P((struct mount *, int, struct proc *));
 void   vfsinit __P((void));
 void   vfs_opv_init __P((struct vnodeopv_desc **));
diff -r e99caa48642f -r cf85d1a02bcb sys/sys/vnode.h
--- a/sys/sys/vnode.h   Sat Jun 10 18:17:18 2000 +0000
+++ b/sys/sys/vnode.h   Sat Jun 10 18:27:01 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnode.h,v 1.76 2000/05/28 04:13:57 mycroft Exp $       */
+/*     $NetBSD: vnode.h,v 1.77 2000/06/10 18:27:05 assar Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -488,7 +488,7 @@
 int    getnewvnode __P((enum vtagtype tag, struct mount *mp,
                         int (**vops) __P((void *)), struct vnode **vpp));
 int    getvnode __P((struct filedesc *fdp, int fd, struct file **fpp));
-void   vfs_getnewfsid __P((struct mount *, char *));
+void   vfs_getnewfsid __P((struct mount *));
 int    speedup_syncer __P((void));
 void   vattr_null __P((struct vattr *vap));
 int    vcount __P((struct vnode *vp));



Home | Main Index | Thread Index | Old Index