NetBSD Problem Report #467

From gnats  Thu Sep  8 13:42:07 1994
Received: from Collatz.McRCIM.McGill.EDU (Collatz.McRCIM.McGill.EDU [132.206.78.1]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id NAA00767 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Thu, 8 Sep 1994 13:42:02 -0700
Message-Id: <199409080020.UAA04960@Collatz.McRCIM.McGill.EDU>
Date: Wed, 7 Sep 1994 20:20:24 -0400
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
Reply-To: mouse@Collatz.McRCIM.McGill.EDU
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: mnt_stat.f_fstypename not filled in early enough
X-Send-Pr-Version: 3.2

>Number:         467
>Category:       kern
>Synopsis:       mnt_stat.f_fstypename not filled in early enough
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 08 14:05:34 +0000 1994
>Closed-Date:    Thu Sep 15 08:25:21 +0000 1994
>Last-Modified:  
>Originator:     der Mouse
>Release:        NetBSD/sparc 1.0_BETA
>Organization:
	Dis-
>Environment:
	Irrelevant, as far as I can tell [SPARC IPC, if it matters]
>Description:
	The f_fstypename[] values from getmntinfo() are sometimes
	blank.  I have traced this all the way back to the kernel; the
	problem appears to be that some filesystems don't fill in this
	field until a VOP_STATFS is done - which isn't done if
	MNT_NOWAIT is specified.  This is not very important at
	present, but if either of the two sets of changes I've seen to
	mount to avoid remounting filesystems when -a is used is
	adopted, it becomes much more important, because they use this
	field (this is why I classed this pr "serious").
>How-To-Repeat:
	Boot single-user
	# mount -t kernfs kernfs /kern
	# mount             # notice blank "type" field for /kern
	# df                # or anything else to force the VOP_STATFS
	# mount             # notice "type" field is now correct
>Fix:
	Presumably, make sure all filesystems fill in the
	f_fstypename[] field at mount time.  The filesystems I've had
	trouble with are kernfs, procfs, fdesc, and null.  ufs seems to
	be okay; I think nfs is too, but am not sure.


	The real solution here is to stat the file system on mounting to make
	sure that the mnt_stat field is filled in.  FFS, NFS, and some others
	already did this.  For now I've added calls to the various miscfs file
	systems, but perhaps it should be done in mount(2) itself.  - mycroft

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Thu Sep 15 01:25:21 PDT 1994 
State-Changed-Why:  
Fixed. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.