From owner-freebsd-bugs@FreeBSD.ORG Tue Apr 23 21:40:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2A05174F for ; Tue, 23 Apr 2013 21:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 0C66410B8 for ; Tue, 23 Apr 2013 21:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r3NLe0h2009683 for ; Tue, 23 Apr 2013 21:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3NLe0bp009682; Tue, 23 Apr 2013 21:40:00 GMT (envelope-from gnats) Resent-Date: Tue, 23 Apr 2013 21:40:00 GMT Resent-Message-Id: <201304232140.r3NLe0bp009682@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Garrett Cooper Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B084F4A9 for ; Tue, 23 Apr 2013 21:30:05 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id A29E1105C for ; Tue, 23 Apr 2013 21:30:05 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r3NLU4m0021286 for ; Tue, 23 Apr 2013 21:30:04 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r3NLU4nD021278; Tue, 23 Apr 2013 21:30:04 GMT (envelope-from nobody) Message-Id: <201304232130.r3NLU4nD021278@red.freebsd.org> Date: Tue, 23 Apr 2013 21:30:04 GMT From: Garrett Cooper To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/178091: [md/nfs/vfs] md filesystem layering not handled correctly when stacking on top of NFS; works with tempfs X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Apr 2013 21:40:01 -0000 >Number: 178091 >Category: kern >Synopsis: [md/nfs/vfs] md filesystem layering not handled correctly when stacking on top of NFS; works with tempfs >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 23 21:40:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: 10-CURRENT >Organization: EMC Isilon >Environment: FreeBSD mina3010.west.isilon.com 10.0-CURRENT FreeBSD 10.0-CURRENT #1: Sat Apr 20 07:51:00 PDT 2013 root@mina3010.west.isilon.com:/usr/obj/usr/src/sys/ISI-GENERIC amd64 >Description: I intentionally layered these filesystems on a build client machine in order to avoid having to rework things with respect to MAKEOBJDIRPREFIX, but it turns out this isn't possible with memory disks mounted on NFS. Example: Client: # uname -a FreeBSD mina3010.west.isilon.com 10.0-CURRENT FreeBSD 10.0-CURRENT #1: Sat Apr 20 07:51:00 PDT 2013 root@mina3010.west.isilon.com:/usr/obj/usr/src/sys/ISI-GENERIC amd64 # stat -f %d /mnt/onefs.3/obj/ 973143811 # stat -f %d /mnt/onefs.3/src/ 973143811 # mount | grep /mnt gran-tourismo:/home/gcooper/svn on /mnt (nfs, asynchronous) /dev/md42 on /mnt/onefs.3/obj (ufs, local, soft-updates) This however functions as I would expect with memory disks mounted on ZFS: Client/Server: # uname -a FreeBSD gran-tourismo.west.isilon.com 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r+ba9afe9: Fri Apr 19 20:29:10 PDT 2013 gcooper@gran-tourismo.west.isilon.com:/usr/obj/usr/src/sys/GRAN-TOURISMO amd64 # mkdir foo; mdmfs -s 100m md4 foo load: 12.79 cmd: mdmfs 43756 [tx->tx_quiesce_done_cv] 2.29r 0.00u 0.00s 0% 196k # stat -f %d $PWD/foo/ 124 # stat -f %d $PWD 1152244014 There are some VFS layering issues and dot-dot lookup issues with md(4)/NFS that really need to be resolved, because really the device numbers returned for both paths should be different. tempfs works BTW in place of md(4): # umount /mnt/onefs.3/obj # mdconfig -d -u 42 # mount -o size=$(( 100 * 1024 * 1024 )) -t tmpfs tmpfs /mnt/onefs.3/obj # stat -f %d /mnt/onefs.3/obj/ 2264989444 # stat -f %d /mnt/onefs.3/src 973143811 >How-To-Repeat: 1. Mount an NFS share on CURRENT from a CURRENT NFS server. 2. Create a directory on the share. 3. Mount a memory disk on the directory on the share [using mdmfs]. 4. Run stat -f %d on the directory on the share and the share itself. The values should be different. >Fix: >Release-Note: >Audit-Trail: >Unformatted: