Date: Sun, 5 Sep 2010 12:14:24 -0400 (EDT) From: Rick Macklem <rmacklem@uoguelph.ca> To: John Baldwin <jhb@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, dfr@freebsd.org Subject: Re: svn commit: r212216 - head/sys/fs/nfsclient Message-ID: <1589618736.502674.1283703264801.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <201009050846.14288.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Saturday 04 September 2010 08:10:18 pm Rick Macklem wrote: > > Author: rmacklem > > Date: Sun Sep 5 00:10:18 2010 > > New Revision: 212216 > > URL: http://svn.freebsd.org/changeset/base/212216 > > > > Log: > > Disable use of the NLM in the experimental NFS client, since > > it will crash the kernel because it uses the nfsmount and > > nfsnode structures of the regular NFS client. > > Hmm, perhaps we could provide new VFS and/or VOP methods for NLM to > use > instead of reaching inside of those structures directly? I think we > really > want to support NLM on the new NFS client as many folks want working > NFS > locking. > Actually, passing the extra information in would just be a matter of adding extra arguments to nlm_advlock(), which is always called by the nfs clients and never as a VOP_ADVLOCK() call. This would be slightly ugly, but not that messy and doesn't require VOP changes. Where it gets ugly is that nlm_advlock() saves "struct nfsmount *nmp" in a structure called "struct nlm_feedback_arg nf" and uses that later to fiddle with fields in *nmp in nlm_down() and nlm_up() called from nlm_feedback(), which is called asynchronously from the krpc layer. (This does need to be fixed someday, since it is badly broken for forced dismounts.) If you look at nlm_down() and nlm_up(), it uses the *nmp to avoid doing a vfs_event_signal() call multiple times for a mount point. Since I don't understand what vfs_event_signal(fsid, VQ_NOTRESPLOCK, 0); actually does, I don't know if multiple calls would be a serious problem? I suppose I could add a global/malloc'd list of structures to nlm_advlock() { one for each *nmp } to keep this flag, but then I'm not sure I'd know when to get rid of elements in the list (because I wouldn't know when a mount point is dismounted?). I looked at this some time ago, when kib@ was trying to fix forced dismounts, but never got it fixed then. If this ugly bit is fixed, I think adding extra args to nlm_advlock() would make it work for both clients concurrently. If anyone can help with the ugly part, please pass along any suggestions. Thanks, rick ps: and I don't want to "own" the nlm:-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1589618736.502674.1283703264801.JavaMail.root>