Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 May 2011 19:24:15 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Rick Macklem <rmacklem@uoguelph.ca>
Cc:        Kostik Belousov <kostikbel@gmail.com>, Rick Macklem <rmacklem@freebsd.org>, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r222466 - head/sbin/umount
Message-ID:  <alpine.BSF.2.00.1105301923140.1535@fledge.watson.org>
In-Reply-To: <336367081.983085.1306763929731.JavaMail.root@erie.cs.uoguelph.ca>
References:  <336367081.983085.1306763929731.JavaMail.root@erie.cs.uoguelph.ca>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mon, 30 May 2011, Rick Macklem wrote:

> 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.)

If it masks, for example, lateny for a synchronous RPC to the remote mountd to 
deregister the mountpoint, allowing a cache flush and unmount to take place 
concurrently, that might be a useful benefit.  I'm not sure I see any evidence 
that is the case in the source code, however.

Robert



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1105301923140.1535>