Source-Changes-HG archive

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

[src/trunk]: src/sys/miscfs set mp->mnt_stat.f_namemax on filesystem mount, f...



details:   https://anonhg.NetBSD.org/src/rev/45ae2f0d9fb3
branches:  trunk
changeset: 569922:45ae2f0d9fb3
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Sep 13 19:19:44 2004 +0000

description:
set mp->mnt_stat.f_namemax on filesystem mount, for use by statvfs

diffstat:

 sys/miscfs/fdesc/fdesc_vfsops.c   |  6 +++---
 sys/miscfs/kernfs/kernfs_vfsops.c |  8 ++++----
 sys/miscfs/portal/portal_vfsops.c |  6 +++---
 sys/miscfs/procfs/procfs_vfsops.c |  8 ++++----
 4 files changed, 14 insertions(+), 14 deletions(-)

diffs (144 lines):

diff -r fce59dbf7ee2 -r 45ae2f0d9fb3 sys/miscfs/fdesc/fdesc_vfsops.c
--- a/sys/miscfs/fdesc/fdesc_vfsops.c   Mon Sep 13 18:42:59 2004 +0000
+++ b/sys/miscfs/fdesc/fdesc_vfsops.c   Mon Sep 13 19:19:44 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fdesc_vfsops.c,v 1.51 2004/05/25 14:54:57 hannken Exp $        */
+/*     $NetBSD: fdesc_vfsops.c,v 1.52 2004/09/13 19:19:44 jdolecek Exp $       */
 
 /*
  * Copyright (c) 1992, 1993, 1995
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdesc_vfsops.c,v 1.51 2004/05/25 14:54:57 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdesc_vfsops.c,v 1.52 2004/09/13 19:19:44 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -107,6 +107,7 @@
        rvp->v_type = VDIR;
        rvp->v_flag |= VROOT;
        fmp->f_root = rvp;
+       mp->mnt_stat.f_namemax = MAXNAMLEN;
        mp->mnt_flag |= MNT_LOCAL;
        mp->mnt_data = fmp;
        vfs_getnewfsid(mp);
@@ -239,7 +240,6 @@
        sbp->f_ffree = freefd;          /* See comments above */
        sbp->f_favail = freefd;         /* See comments above */
        sbp->f_fresvd = 0;
-       sbp->f_namemax = MAXNAMLEN;
        copy_statvfs_info(sbp, mp);
        return (0);
 }
diff -r fce59dbf7ee2 -r 45ae2f0d9fb3 sys/miscfs/kernfs/kernfs_vfsops.c
--- a/sys/miscfs/kernfs/kernfs_vfsops.c Mon Sep 13 18:42:59 2004 +0000
+++ b/sys/miscfs/kernfs/kernfs_vfsops.c Mon Sep 13 19:19:44 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kernfs_vfsops.c,v 1.64 2004/05/29 14:28:41 tron Exp $  */
+/*     $NetBSD: kernfs_vfsops.c,v 1.65 2004/09/13 19:19:45 jdolecek Exp $      */
 
 /*
  * Copyright (c) 1992, 1993, 1995
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vfsops.c,v 1.64 2004/05/29 14:28:41 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vfsops.c,v 1.65 2004/09/13 19:19:45 jdolecek Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -158,8 +158,9 @@
        memset(fmp, 0, sizeof(*fmp));
        TAILQ_INIT(&fmp->nodelist);
 
+       mp->mnt_stat.f_namemax = MAXNAMLEN;
+       mp->mnt_flag |= MNT_LOCAL;
        mp->mnt_data = fmp;
-       mp->mnt_flag |= MNT_LOCAL;
        vfs_getnewfsid(mp);
 
        if ((error = set_statvfs_info(path, UIO_USERSPACE, "kernfs",
@@ -245,7 +246,6 @@
        sbp->f_ffree = 128;     /* XXX lie */
        sbp->f_favail = 128;    /* XXX lie */
        sbp->f_fresvd = 0;
-       sbp->f_namemax = MAXNAMLEN;
        copy_statvfs_info(sbp, mp);
        return (0);
 }
diff -r fce59dbf7ee2 -r 45ae2f0d9fb3 sys/miscfs/portal/portal_vfsops.c
--- a/sys/miscfs/portal/portal_vfsops.c Mon Sep 13 18:42:59 2004 +0000
+++ b/sys/miscfs/portal/portal_vfsops.c Mon Sep 13 19:19:44 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: portal_vfsops.c,v 1.46 2004/05/25 14:54:57 hannken Exp $       */
+/*     $NetBSD: portal_vfsops.c,v 1.47 2004/09/13 19:19:45 jdolecek Exp $      */
 
 /*
  * Copyright (c) 1992, 1993, 1995
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: portal_vfsops.c,v 1.46 2004/05/25 14:54:57 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: portal_vfsops.c,v 1.47 2004/09/13 19:19:45 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -156,6 +156,7 @@
        fp->f_count++;
        simple_unlock(&fp->f_slock);
 
+       mp->mnt_stat.f_namemax = MAXNAMLEN;
        mp->mnt_flag |= MNT_LOCAL;
        mp->mnt_data = fmp;
        vfs_getnewfsid(mp);
@@ -277,7 +278,6 @@
        sbp->f_ffree = 0;               /* See comments above */
        sbp->f_favail = 0;              /* See comments above */
        sbp->f_fresvd = 0;
-       sbp->f_namemax = MAXNAMLEN;
        copy_statvfs_info(sbp, mp);
        return (0);
 }
diff -r fce59dbf7ee2 -r 45ae2f0d9fb3 sys/miscfs/procfs/procfs_vfsops.c
--- a/sys/miscfs/procfs/procfs_vfsops.c Mon Sep 13 18:42:59 2004 +0000
+++ b/sys/miscfs/procfs/procfs_vfsops.c Mon Sep 13 19:19:44 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: procfs_vfsops.c,v 1.57 2004/05/25 14:54:57 hannken Exp $       */
+/*     $NetBSD: procfs_vfsops.c,v 1.58 2004/09/13 19:19:45 jdolecek Exp $      */
 
 /*
  * Copyright (c) 1993
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_vfsops.c,v 1.57 2004/05/25 14:54:57 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vfsops.c,v 1.58 2004/09/13 19:19:45 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -162,10 +162,11 @@
        } else
                args.flags = 0;
 
-       mp->mnt_flag |= MNT_LOCAL;
        pmnt = (struct procfsmount *) malloc(sizeof(struct procfsmount),
            M_UFSMNT, M_WAITOK);   /* XXX need new malloc type */
 
+       mp->mnt_stat.f_namemax = MAXNAMLEN;
+       mp->mnt_flag |= MNT_LOCAL;
        mp->mnt_data = pmnt;
        vfs_getnewfsid(mp);
 
@@ -244,7 +245,6 @@
        sbp->f_ffree = maxproc - nprocs;        /* approx */
        sbp->f_favail = maxproc - nprocs;       /* approx */
        sbp->f_fresvd = 0;
-       sbp->f_namemax = MAXNAMLEN;
        copy_statvfs_info(sbp, mp);
        return (0);
 }



Home | Main Index | Thread Index | Old Index