From owner-freebsd-fs@FreeBSD.ORG Fri Aug 10 08:13:58 2007 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E11516A418 for ; Fri, 10 Aug 2007 08:13:58 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from natial.ongs.co.jp (natial.ongs.co.jp [202.216.232.58]) by mx1.freebsd.org (Postfix) with ESMTP id 471E113C459 for ; Fri, 10 Aug 2007 08:13:58 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from parancell.ongs.co.jp (dullmdaler.ongs.co.jp [202.216.232.62]) by natial.ongs.co.jp (Postfix) with ESMTP id B74E9244C19; Fri, 10 Aug 2007 16:49:17 +0900 (JST) Message-ID: <46BC187C.6030209@freebsd.org> Date: Fri, 10 Aug 2007 16:49:16 +0900 From: Daichi GOTO User-Agent: Thunderbird 2.0.0.6 (X11/20070803) MIME-Version: 1.0 To: nowickis References: <53617a56.fdaa6fb.469fde4f.a6f89@o2.pl> In-Reply-To: <53617a56.fdaa6fb.469fde4f.a6f89@o2.pl> Content-Type: multipart/mixed; boundary="------------090508060300040507090805" Cc: freebsd-fs@freebsd.org Subject: Re: unionfs problem X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2007 08:13:58 -0000 This is a multi-part message in MIME format. --------------090508060300040507090805 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit nowickis wrote: > Hi. > > I'm having problems using unionfs on freebsd. > Scenario is like this: On one machine (m1) I’m having /usr/ports dir with is updated every day. > On another machine (m2) I’m mounting /usr/ports from m1 by nfs to /usr/ports on m2. > Of course on m2 /usr/ports is read-only. So, I was starting to using unionfs on m2. > I have create dir (/tmp/somedir) and use unionfs as root mount_unionfs /tmp/somedir /usr/ports For now everything works fine, > I have writing privileges to /use/ports on m2. > I'm mono (http://www.go-mono.com) user, so I want to install the latest version of this port. > I need to use mono-merge script (which you can get from http://forge.novell.com/modules/xfmod/project/?bsd-sharp) to merge mono > ports tree witch /usr/ports tree. (this is the way do get the latest version of mono’s ports). > When I run this script, after couple of seconds, my machine (m2) is freezing, completely no response. > Only what I can do is reset it. This freezing is occurring when mono-merge is recursion deleting some folders > in /usr/ports. Of course, then when /use/ports is on local machine (no mounted) mono-merge works fine. > This problem is occurring on freebsd 6.2 and 7.0. I have try traditional, transparent and masquerade mode. Result is the same. > Do you have any idea what I’m doing wrong? > Maybe there is a bug in unionfs. > > Regards > > Nowicki Sebastian > After long-long tests, at last, we had found the same problem you reported. Our research says that the issue depends on implementation bug of nfs_readdir of nfsclient or nfs4client. (for detail, it ignores eofflag request). I include a patch that prevent that issue. Would you try please. And we haveno plan to get it merged because this issue is not of unionfs. It should be fixed on nfs_readdir of nfsclient. Thanks -- Daichi GOTO, http://people.freebsd.org/~daichi --------------090508060300040507090805 Content-Type: text/x-patch; name="unionfs-nfs-hangup.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="unionfs-nfs-hangup.diff" diff -urBN /usr/src.orig/sys/fs/unionfs/union_subr.c /usr/src/sys/fs/unionfs/union_subr.c --- /usr/src.orig/sys/fs/unionfs/union_subr.c 2007-07-09 19:27:08.000000000 +0900 +++ /usr/src/sys/fs/unionfs/union_subr.c 2007-08-08 01:19:58.000000000 +0900 @@ -1129,7 +1129,7 @@ uio.uio_resid = iov.iov_len; error = VOP_READDIR(lvp, &uio, cred, &eofflag, NULL, NULL); - if (error) + if (error || uio.uio_resid == sizeof(buf)) break; edp = (struct dirent*)&buf[sizeof(buf) - uio.uio_resid]; --------------090508060300040507090805--