From owner-freebsd-stable@FreeBSD.ORG Fri Feb 12 18:40:45 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1600D106566B for ; Fri, 12 Feb 2010 18:40:45 +0000 (UTC) (envelope-from nate@thatsmathematics.com) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id A04028FC16 for ; Fri, 12 Feb 2010 18:40:44 +0000 (UTC) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id o1CIK7Y26176; Fri, 12 Feb 2010 10:20:07 -0800 (PST) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id o1CIK7U25395; Fri, 12 Feb 2010 10:20:07 -0800 (PST) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Fri, 12 Feb 2010 10:20:06 -0800 (PST) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Dmitry Marakasov In-Reply-To: <20100212180032.GC94665@hades.panopticon> Message-ID: References: <201002102046.o1AKkrvj085173@lurza.secnetix.de> <20100212180032.GC94665@hades.panopticon> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Oliver Fromme , freebsd-stable@freebsd.org Subject: Re: NFS write corruption on 8.0-RELEASE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2010 18:40:45 -0000 On Fri, 12 Feb 2010, Dmitry Marakasov wrote: > * Oliver Fromme (olli@lurza.secnetix.de) wrote: > >> This is an excerpt from Solaris' mount_nfs(1M) manpage: >> >> File systems that are mounted read-write or that con- >> tain executable files should always be mounted with >> the hard option. Applications using soft mounted file >> systems may incur unexpected I/O errors, file corrup- >> tion, and unexpected program core dumps. The soft >> option is not recommended. >> >> FreeBSD's manual page doesn't contain such a warning, but >> maybe it should. (It contains a warning not to use "soft" >> with NFSv4, though, for different reasons.) > > Interesting, I'll try disabling it. However now I really wonder why > is such dangerous option available (given it's the cause) at all, > especially without a notice. Silent data corruption is possibly the > worst thing to happen ever. Tell me about it. :) But in this case I'm not sure I understand. As I understand it, the difference between soft and hard is that in the case of soft, a timeout will result in the operation failing and returning EIO or the like (hence "unexpected I/O errors"). And if the operation is being done to fault in a mapped page, you'd have to notify the process asynchronously by sending a signal like SIGBUS which it may not be expecting (hence "unexpected core dumps"). But in what scenario would you see file corruption? Unless you have a buggy program that doesn't check return values from system calls or handles signals in a stupid way, I don't see how this can happen, and I'm not sure what the Sun man page is referring to. -- Nate Eldredge nate@thatsmathematics.com