Date: Thu, 29 Aug 2013 03:56:16 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Rick Macklem <rmacklem@uoguelph.ca> Cc: freebsd-fs <freebsd-fs@freebsd.org> Subject: Re: fixing "umount -f" for the NFS client Message-ID: <20130829005616.GH4972@kib.kiev.ua> In-Reply-To: <2057976640.15042430.1377735327317.JavaMail.root@uoguelph.ca> References: <2057976640.15042430.1377735327317.JavaMail.root@uoguelph.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
--huwNgOI5TI5AwA3T Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 28, 2013 at 08:15:27PM -0400, Rick Macklem wrote: > 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(). >=20 > 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. >=20 > The problem seems to be that dounmount() msleep()s while > mnt_lockref !=3D 0 before calling VFS_UNMOUNT(). >=20 > 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. >=20 > 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. >=20 > Anyone have comments on this? >=20 Yes, I do. I agree with adding the pre-unmount vfs method. This seems to be the cleanest solution possible. --huwNgOI5TI5AwA3T Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSHpwvAAoJEJDCuSvBvK1Bu9EP/i4ulJS03WTiV8Nu2rQJWFgM EXOJco5g/AeUjDIi0xo+Wk1BTfErnHIWFv7erCeDULtLEu4rj5zq4vOSbqPrqW9w mgD4J6FOuqda4rdMtWZYq/lwaXYGiKcu6frxtVxsag1yhZwjaZzavyBK7EburagX utVEOcizXXQtiL0ZgRoeyVejVAyJYt7xz/032+nghc9WKp0Zc0fyC2TWOiIsmHRq h09J9iYIL0mxj2r7mM6GiHaclPrl9q2e/wYV1Civ117NYI/E2G/z4CwW9/gtpFnM qnsaNHWbKJFfJGwMpfG4icLgwXbBgsmH0TI4lBKx9yk/sRaIDNmLrvpBwoQxZADH 8JsU+K8sV17ESnHnSKNWFvwWi69+BYl3eNE1EGo4nYZOD1AusP951xt3hU9Qd8d+ uTsD6KMnjlOS4L6Gnii1Gp4N00eaJHjO21Zj++CtYhfF24/i73zrutzD2axo2hAf tK9o37V5/Urnoa1pDuJLn/CI51XdbnesVma7mkQlTl6rDFdF8LPxfE/1QarxDl6w GVw+4oLYpA3RREiKvre8Te9tN6lY+9CPV87JOefb/Fo9aS/bwphcdyNxCmh4FnAk baLvf+27PzIqMBA2EV/pOAFCdFBWPH1QwSjeAIbFUGVjtBVWftWWxDQT72n2IgtV uICNAIQEMfYfXUcDh3at =RcCt -----END PGP SIGNATURE----- --huwNgOI5TI5AwA3T--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130829005616.GH4972>