Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Aug 2013 20:15:27 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        freebsd-fs <freebsd-fs@freebsd.org>
Cc:        Kostik Belousov <kib@freebsd.org>
Subject:   fixing "umount -f" for the NFS client
Message-ID:  <2057976640.15042430.1377735327317.JavaMail.root@uoguelph.ca>

next in thread | raw e-mail | index | archive | help
I've been doing a little more testing of "umount -f" for NFS
mounts and they seem to be working unless some other process/thread
has busied the file system via vfs_busy().

Unfortunately, it is pretty easy to vfs_busy() the file system
by using a command like "df" that is stuck on the unresponsive
NFS server.

The problem seems to be that dounmount() msleep()s while
mnt_lockref != 0 before calling VFS_UNMOUNT().

If some call into the NFS client was done before this
while (mp->mnt_lockref) loop with msleep() in it, it
can easily kill off RPCs in progress. (It currently
does this in nfs_unmount() using the newnfs_nmcancelreqs()
call.

In summary:
- Would it be appropriate to add a new vfs_XXX method that
  dounmount() would call before the while() loop for the
  forced dismount case?
  (The default would be a no-op and I have no idea if any
   file system other than NFS would have a use for it?)
  Alternately, there could be a function pointer set non-NULL
  that would specifically be used by the NFS client for this.
  This would avoid adding a vfs_XXX() method, but would mean
  an NFS specific call ends up in the generic dounmount() code.

Anyone have comments on this?

Thanks, rick




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2057976640.15042430.1377735327317.JavaMail.root>