From owner-svn-src-head@FreeBSD.ORG Mon May 30 13:58:51 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EC24106566C; Mon, 30 May 2011 13:58:51 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id C502F8FC1F; Mon, 30 May 2011 13:58:50 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap0EAIqh402DaFvO/2dsb2JhbABVhEmiWIhxrDqQEoErg2yBBwSQT482 X-IronPort-AV: E=Sophos;i="4.65,291,1304308800"; d="scan'208";a="122302127" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 30 May 2011 09:58:49 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id B5DA8B3F29; Mon, 30 May 2011 09:58:49 -0400 (EDT) Date: Mon, 30 May 2011 09:58:49 -0400 (EDT) From: Rick Macklem To: Kostik Belousov Message-ID: <336367081.983085.1306763929731.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20110530130751.GV48734@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r222466 - head/sbin/umount X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2011 13:58:51 -0000 > On Mon, May 30, 2011 at 01:48:53PM +0100, Robert Watson wrote: > > On Sun, 29 May 2011, Rick Macklem wrote: > > > > > Modify the umount(8) command so that it doesn't do > > > a sync(2) syscall before unmount(2) for the "-f" case. > > > This avoids a forced dismount from getting stuck for > > > an NFS mountpoint in sync() when the server is not > > > responsive. With this commit, forced dismounts should > > > normally work for the NFS clients, but can take up to > > > about 1minute to complete. > > > > I'm actually a bit confused about why umount(8) calls sync(2) at > > all: > > surely it's the responsibility of the file system, rather than the > > userland > > tool, to ensure consistency subject to file system configuration and > > unmount-time flags? > This call is from the same department as triple-sync before reboot, > IMO. Hehe. I'm so old, I do two syncs, as required by 6th Edition.:-) I assumed the sync() was meant to be an optimization (given the comment for it) in the sense that it would get the writes of dirty blocks started "right away". However, given the short period of time from the the sync(2) call to the unmount(2) call, I'm not convinced it makes a significant difference. (I thought of just getting rid of it, but figured it was harmless for the non "-f" case and might matter for a buggy fs that doesn't get the unmount(2) quite right. ie. Same argument as doing the triple-sync, just to be sure.) rick