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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to