NetBSD Problem Report #42782

From martin@aprisoft.de  Wed Feb 10 09:15:16 2010
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id C60EE63BBAC
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 10 Feb 2010 09:15:16 +0000 (UTC)
Message-Id: <20100210091509.3E28AAF581C@emmas.aprisoft.de>
Date: Wed, 10 Feb 2010 10:15:09 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: mount_mfs fails
X-Send-Pr-Version: 3.95

>Number:         42782
>Category:       kern
>Synopsis:       mount_mfs fails
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 10 09:20:01 +0000 2010
>Closed-Date:    Tue Jun 29 17:38:48 +0000 2010
>Last-Modified:  Tue Jun 29 17:38:48 +0000 2010
>Originator:     Martin Husemann
>Release:        NetBSD 5.99.24
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD after-hours.aprisoft.de 5.99.24 NetBSD 5.99.24 (SCHIZO) #85: Wed Feb 10 10:06:45 CET 2010 martin@emmas.aprisoft.de:/nelly/usr/src/sys/arch/sparc64/compile/SCHIZO sparc64
Architecture: sparc64
Machine: sparc64
>Description:

Trying

 mount_mfs -s 256m swap /mnt

on a -current sparc64 system says:
mount_mfs: /mnt: mount: Unknown error: 252

This happens because VOP_MOUNT() (called in mount_domount, via do_sys_mount<-
sys___mount50) returns EPASSTHROUGH.

>How-To-Repeat:
s/a

>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/42782: mount_mfs fails
Date: Wed, 10 Feb 2010 10:24:47 +0100

 On Wed, Feb 10, 2010 at 09:20:01AM +0000, martin@NetBSD.org wrote:
 > Trying
 > 
 >  mount_mfs -s 256m swap /mnt

 Forgot to mention: /mnt lives on ffs.

 Martin

State-Changed-From-To: open->analyzed
State-Changed-By: pooka@NetBSD.org
State-Changed-When: Wed, 10 Feb 2010 13:43:41 +0200
State-Changed-Why:
the error comes from genfs_enoioctl() called by the newly-added
getdisksize().  Apparently it's now unused so removing the call
might be a quick fix.


From: Michael van Elst <mlelstv@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/42782 CVS commit: src/sys/ufs/ffs
Date: Thu, 11 Feb 2010 00:06:16 +0000

 Module Name:	src
 Committed By:	mlelstv
 Date:		Thu Feb 11 00:06:16 UTC 2010

 Modified Files:
 	src/sys/ufs/ffs: ffs_vfsops.c

 Log Message:
 There is no code left that uses disk size data, so don't query it.
 This also failed when querying the simulated block device from mfs.
 Fixes PR kern/42782.


 To generate a diff of this commit:
 cvs rdiff -u -r1.257 -r1.258 src/sys/ufs/ffs/ffs_vfsops.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org, martin@NetBSD.org,
        mlelstv@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: PR/42782 CVS commit: src/sys/ufs/ffs
Date: Fri, 12 Feb 2010 00:42:12 +0900

 >  Module Name:	src
 >  Committed By:	mlelstv
 >  Date:		Thu Feb 11 00:06:16 UTC 2010
 >  
 >  Modified Files:
 >  	src/sys/ufs/ffs: ffs_vfsops.c
 >  
 >  Log Message:
 >  There is no code left that uses disk size data, so don't query it.
 >  This also failed when querying the simulated block device from mfs.
 >  Fixes PR kern/42782.

  * ext2fs has the similar code.
  * msdosfs still uses getdisksize() and secsize, and
    mountfs fails if getdisksize() returns error.

 ---
 Izumi Tsutsui

From: Michael van Elst <mlelstv@serpens.de>
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Cc: gnats-bugs@NetBSD.org, kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org,
        martin@NetBSD.org, mlelstv@NetBSD.org
Subject: Re: PR/42782 CVS commit: src/sys/ufs/ffs
Date: Thu, 11 Feb 2010 20:15:04 +0100

 On Fri, Feb 12, 2010 at 12:42:12AM +0900, Izumi Tsutsui wrote:
 > >  Module Name:	src
 > >  Committed By:	mlelstv
 > >  Date:		Thu Feb 11 00:06:16 UTC 2010
 > >  
 > >  Modified Files:
 > >  	src/sys/ufs/ffs: ffs_vfsops.c
 > >  
 > >  Log Message:
 > >  There is no code left that uses disk size data, so don't query it.
 > >  This also failed when querying the simulated block device from mfs.
 > >  Fixes PR kern/42782.
 > 
 >  * ext2fs has the similar code.

 mfs fails because mfs is a hack that simulates only the block device
 without the underlying disk driver. As such it does not provide
 information about disk size or physical sector size.

 Fortunately mfs is ffs in disguise and ffs does not need real information
 about the physical disk on NetBSD because it can rely on DEV_BSIZE when
 talking to device drivers and stores disk size information in the
 superblock.

 ext2fs isn't used with such a hack but only with real device drivers,
 so it doesn't matter. However, it also doesn't need information about
 the physical disk on NetBSD (for the same reason as ffs),
 so the query can go away.

 >  * msdosfs still uses getdisksize() and secsize, and
 >    mountfs fails if getdisksize() returns error.

 msdosfs is also used with real device drivers. So far it does
 require information about the physical disk and it would have
 failed the same way before I encapsulated the ioctl's into
 getdisksize(). Why do you think that's bad now?


 Greetings,
 -- 
                                 Michael van Elst
 Internet: mlelstv@serpens.de
                                 "A potential Snark may lurk in every tree."

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: mlelstv@serpens.de
Cc: gnats-bugs@NetBSD.org, kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org,
        martin@NetBSD.org, mlelstv@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: PR/42782 CVS commit: src/sys/ufs/ffs
Date: Fri, 12 Feb 2010 08:22:41 +0900

 > >  * msdosfs still uses getdisksize() and secsize, and
 > >    mountfs fails if getdisksize() returns error.
 > 
 > msdosfs is also used with real device drivers. So far it does
 > require information about the physical disk and it would have
 > failed the same way before I encapsulated the ioctl's into
 > getdisksize(). Why do you think that's bad now?

 Consider msdosfs on md(4), for example.
 I don't think we can assume all possible devvps have
 necessary ioctls.
 ---
 Izumi Tsutsui

State-Changed-From-To: analyzed->closed
State-Changed-By: pooka@NetBSD.org
State-Changed-When: Tue, 29 Jun 2010 20:38:48 +0300
State-Changed-Why:
mount_mfs no longer fails.  the other issues can be discussed elsewhere.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.