From nobody@FreeBSD.org  Tue Feb  3 13:44:14 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 325011065676
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  3 Feb 2009 13:44:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 1F6898FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  3 Feb 2009 13:44:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n13DiDvw029695
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 3 Feb 2009 13:44:13 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n13DiDSq029694;
	Tue, 3 Feb 2009 13:44:13 GMT
	(envelope-from nobody)
Message-Id: <200902031344.n13DiDSq029694@www.freebsd.org>
Date: Tue, 3 Feb 2009 13:44:13 GMT
From: Oleg Ginzburg <oleg.ginzburg@nevosoft.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: error "Bad file descriptor"  on the mount point of md-presentation makefs image
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         131341
>Category:       bin
>Synopsis:       makefs: error "Bad file descriptor"  on the mount point of md-presentation makefs image
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 03 13:50:02 UTC 2009
>Closed-Date:    
>Last-Modified:  Tue Mar 24 21:30:01 UTC 2009
>Originator:     Oleg Ginzburg
>Release:        8-CURRENT amd64, 8-CURRENT i386, 7.1-RELEASE i386 (with makefs(8) from the ports)
>Organization:
Nevosoft
>Environment:
FreeBSD oleg.net.nevosoft.ru 8.0-CURRENT FreeBSD 8.0-CURRENT #2 r187912M: Fri Jan 30 13:17:19 MSK 2009     root@oleg.net.nevosoft.ru:/usr/obj/usr/src/sys/o20090103  i386
>Description:
"df <mountpoint>"
return "Bad file descriptor" when mount point is md-based layer presentation of image and image created with sector-size > 512 (default):
--
mount /mnt
mount: /mnt: unknown special file or file system
--

With "df" without arguments pictures is correct
--
df |grep mnt
/dev/md0           5079        1      4672     0%    /mnt
--

>How-To-Repeat:
1) mkdir /tmp/empty && makefs -S 1024 -s 5m /tmp/newimage /tmp/empty
2) mount /dev/`mdconfig -a -t vnode -f /tmp/newimage` /mnt
3) df /mnt
4) df

(where /mnt is free point for mounting)
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-fs 
Responsible-Changed-By: remko 
Responsible-Changed-When: Wed Feb 4 18:40:08 UTC 2009 
Responsible-Changed-Why:  
reassign to -fs 

http://www.freebsd.org/cgi/query-pr.cgi?pr=131341 

From: Jaakko Heinonen <jh@saunalahti.fi>
To: oleg.ginzburg@nevosoft.ru
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/131341: makefs: error "Bad file descriptor" on the mount
	point of md-presentation makefs image
Date: Mon, 23 Mar 2009 18:31:30 +0200

 See this message:
 
 http://docs.freebsd.org/cgi/mid.cgi?20090323154536.GA2853
 
 and a patch:
 
 http://www.saunalahti.fi/~jh3/patches/ffs-fs_fsbtodb.diff
 
 -- 
 Jaakko

From: Oleg Ginzburg <oleg.ginzburg@nevosoft.ru>
To: Jaakko Heinonen <jh@saunalahti.fi>
Cc: bug-followup@freebsd.org
Subject: Re: bin/131341: makefs: error "Bad file descriptor" on the mount point of md-presentation makefs image
Date: Tue, 24 Mar 2009 21:21:14 +0300

 Hello Jaakko,
 
 I've apply yours http://www.saunalahti.fi/~jh3/patches/ffs-fs_fsbtodb.diff 
 patch and this work fine for my, problem of PR-131341 is gone. Thanks a lot!
 
 
 On Monday 23 March 2009 19:31:30 Jaakko Heinonen wrote:
 > See this message:
 >
 > http://docs.freebsd.org/cgi/mid.cgi?20090323154536.GA2853
 >
 > and a patch:
 >
 > http://www.saunalahti.fi/~jh3/patches/ffs-fs_fsbtodb.diff
 
>Unformatted:
