From owner-freebsd-bugs@FreeBSD.ORG Wed Oct 8 14:52:25 2014 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35372C45 for ; Wed, 8 Oct 2014 14:52:25 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1643CAE8 for ; Wed, 8 Oct 2014 14:52:25 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s98EqOAj075168 for ; Wed, 8 Oct 2014 14:52:24 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 186293] tar(1): Problems with tar on FreeBSD 10.0 Date: Wed, 08 Oct 2014 14:52:25 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jnaughto@ee.ryerson.ca X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2014 14:52:25 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=186293 --- Comment #8 from jnaughto@ee.ryerson.ca --- Now the somewhat good news. So after getting the SR report back from Oracle I started to dive into the FreeBSD NFS client code. So this is what I modified and how I got the issue (which seems to be) resolved. On my FreeBSD 10 station: # uname -a FreeBSD NFSCLIENT 10.1-BETA1 FreeBSD 10.1-BETA1 #4 r271672M: Tue Oct 7 16:52:00 EDT 2014 NFSCLIENT:/usr/obj/usr/src/sys/GENERIC amd64 I edited the files: nfs_subs.c NFSCLIENT:/usr/src/sys/nfsclient # ls nfs.h nfs_krpc.c nfs_subs.c nfsargs.h nfsnode.h nfs_bio.c nfs_nfsiod.c nfs_vfsops.c nfsm_subs.h nfsstats.h nfs_kdtrace.c nfs_node.c nfs_vnops.c nfsmount.h nlminfo.h I commented out the following lines in this file if (va->va_atime.tv_sec != VNOVAL) { // if ((va->va_vaflags & VA_UTIMES_NULL) == 0) { // tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos); // *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); // txdr_nfsv3time(&va->va_atime, tl); // } else { tl = nfsm_build_xx(NFSX_UNSIGNED, mb, bpos); *tl = txdr_unsigned(NFSV3SATTRTIME_TOSERVER); // } I also blocked out the following: // if ((va->va_vaflags & VA_UTIMES_NULL) == 0) { // tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos); // *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); // txdr_nfsv3time(&va->va_mtime, tl); // } else { tl = nfsm_build_xx(NFSX_UNSIGNED, mb, bpos); *tl = txdr_unsigned(NFSV3SATTRTIME_TOSERVER); // } How I read this is if the vaflags are set to NULL then let the NFS server set the atime and mtime based on the server's Clock. We're not done yet. To use this code you also seem to have to mount the filesystem with the "oldnfs" flag. For example in my /etc/fstab I have: NFSSERVER:/var/mnt /mnt oldnfs rw,soft 0 0 Now once I re-compiled the FreeBSD kernel to take the above changes into account and of course mount the filesystem with the "oldnfs" flags in place the problems (for what I see) went away. For example: NFSCLIENT:/# mount /mnt NFSCLIENT:/# mount NFSSERVER:/var/mnt on /mnt (oldnfs) NFSCLIENT:/# cd /mnt NFSCLIENT:/mnt# tar xf ~user/foo.tar Now foo.tar has only one file in it BOB which has perms of 0644. Now doing a directory listing: # ls -l NFSCLIENT:/mnt # ls -l total 1 -rw-r--r-- 1 user group 0 Oct 8 10:28 BOB So far so good. Now this seems to resolve my problem right now but I'm not sure whether or not this is going to open up other problems in the future. -- You are receiving this mail because: You are the assignee for the bug.