Re: svn commit: r222466 - head/sbin/umount

2011-06-01 Thread Rick Macklem
> > Did you have to change VFS_SYNC() to pass the forced-dismount flag? I > don't like that, but see the problem: VFS_SYNC(XXX_WAIT) should > normally > just try to sync everything, but return an error if this is > impossible, > but for an nfs server it would take too long to determine that it is

Re: svn commit: r222466 - head/sbin/umount

2011-06-01 Thread Bruce Evans
On Tue, 31 May 2011, Rick Macklem wrote: It is only an optimization. Any number of syncs are useless for actually syncing the system, since sync(2) only does an async sync (it returns without waiting for most writes to complete). As you pointed out later in this thread, unmount(2) does a sync th

Re: svn commit: r222466 - head/sbin/umount

2011-05-31 Thread Rick Macklem
> > It is only an optimization. Any number of syncs are useless for > actually syncing the system, since sync(2) only does an async sync (it > returns without waiting for most writes to complete). As you pointed > out later in this thread, unmount(2) does a sync that works -- a sync > sync -- befo

Re: svn commit: r222466 - head/sbin/umount

2011-05-31 Thread Bruce Evans
On Mon, 30 May 2011, Rick Macklem wrote: 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

Re: svn commit: r222466 - head/sbin/umount

2011-05-30 Thread Rick Macklem
> > 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. >

Re: svn commit: r222466 - head/sbin/umount

2011-05-30 Thread Rick Macklem
> > No doubt. :-) > > If the sync(2) has actual consistency and reliability benefits, it > should > probably be done by the umount(2) system call, so that other future > auto-mounters, etc, also get the same result, rather than having to > encode it > in every application. If it's done on blind f

Re: svn commit: r222466 - head/sbin/umount

2011-05-30 Thread Robert Watson
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 p

Re: svn commit: r222466 - head/sbin/umount

2011-05-30 Thread Robert Watson
On Mon, 30 May 2011, Kostik Belousov wrote: 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 get

Re: svn commit: r222466 - head/sbin/umount

2011-05-30 Thread Rick Macklem
> 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

Re: svn commit: r222466 - head/sbin/umount

2011-05-30 Thread Kostik Belousov
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 mountpoi

Re: svn commit: r222466 - head/sbin/umount

2011-05-30 Thread Robert Watson
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 dis