Page MenuHomeFreeBSD
Feed Advanced Search

Apr 13 2019

rmacklem committed rS346190: Fix nfsdumpstate(8) so that it can print out INET6 callback addresses..
Fix nfsdumpstate(8) so that it can print out INET6 callback addresses.
Apr 13 2019, 9:46 PM
rmacklem closed D19839: add INET6 support to nfsdumpstate for the client callback address.
Apr 13 2019, 9:46 PM
rmacklem added a comment to D19887: fix the NFSv4 client so that it doesn't call pfind() with a mutex held.

I have included responses to the inline comments.

Apr 13 2019, 9:29 PM
rmacklem updated the diff for D19887: fix the NFSv4 client so that it doesn't call pfind() with a mutex held.

This version of the patch uses SX_DUPOK instead of a separate name for each
lock. It also adds a couple of small functions to kern_proc.c to acquire/release
all the pid hash locks, so that the NFS code can call those instead of doing it directly.

Apr 13 2019, 9:27 PM
rmacklem added a comment to D19887: fix the NFSv4 client so that it doesn't call pfind() with a mutex held.

I just read the man page (I know, never read the documentation;-) and it seems that
the recursion check is for exclusive locks, so adding SX_DUPOK would allow a process
to acquire a shared lock that it already has.
So, maybe, sticking with the current patch that applies a unique name to each element
is preferred?

Apr 13 2019, 4:46 AM
rmacklem added a comment to D19887: fix the NFSv4 client so that it doesn't call pfind() with a mutex held.

Ok, the inline comments were still there, so I have just responded to them.

Apr 13 2019, 4:36 AM
rmacklem updated the diff for D19887: fix the NFSv4 client so that it doesn't call pfind() with a mutex held.

This version of the patch brings in pfind_locked() from stable/12, but with the
sx_assert() changed.
Since the code the inline comments were applied to has been removed from this patch,
I'll try to address mjg@'s comments here:

  • Yes, the "optimization" I left in the code wouldn't have ever happened. I just left it in the code so that it looked more like _pfind(). Since that code isn't in pfind_locked(), it is gone.
  • The old pfind_locked() found zombie processes. I know that works ok and I'm not sure that the code would work correctly if zombie processes aren't found. Some of these open/lock_owners refer to opens, where a child of the zombie process might still have the file open. Delaying the cleanup of it until the children die only delays the garbage collection, so all that happens is a little malloc()d memory doesn't get released as soon. Since freeing the openowner prematurely would break things badly, I'd rather leave it finding zombie processes. (The code should delay the cleanup until all opens are closed, but...)
Apr 13 2019, 4:29 AM

Apr 12 2019

rmacklem created D19887: fix the NFSv4 client so that it doesn't call pfind() with a mutex held.
Apr 12 2019, 3:00 AM

Apr 7 2019

rmacklem added a comment to D19839: add INET6 support to nfsdumpstate for the client callback address.

Marked rgrimes@ inline comments as done, per his instructions.

Apr 7 2019, 9:46 PM
rmacklem updated the diff for D19839: add INET6 support to nfsdumpstate for the client callback address.

This version of the patch has the changes mentioned in the inline comments.
A comment has been added explaining that INET[6]_ADDRSTRLEN includes
NULL termination and the length calculation has been changed to "-1 + 8"
from "+ 7" to make the calculation more understandable.

Apr 7 2019, 8:34 PM
rmacklem added a comment to D19839: add INET6 support to nfsdumpstate for the client callback address.

Added replies to the inline comments. I will update the patch with the changes mentioned
in the replies later to-day.
Thanks for the review, rick

Apr 7 2019, 3:21 PM
rmacklem updated the diff for D19839: add INET6 support to nfsdumpstate for the client callback address.

Fixed one place where I had typed AF_INET when it should have been AF_INET6.
This didn't seem to have caused problems during testing, so I don't think it actually mattered,
but it is now correct.

Apr 7 2019, 1:31 AM
rmacklem created D19839: add INET6 support to nfsdumpstate for the client callback address.
Apr 7 2019, 1:12 AM

Apr 6 2019

rmacklem committed rS345995: Delete the BUGS entry related to failing when jails are enabled..
Delete the BUGS entry related to failing when jails are enabled.
Apr 6 2019, 10:14 PM
rmacklem committed rS345994: Fix nfsuserd so that it handles the mapped localhost address when jails.
Fix nfsuserd so that it handles the mapped localhost address when jails
Apr 6 2019, 10:06 PM
rmacklem committed rS345992: Add INET6 support for the upcalls to the nfsuserd daemon..
Add INET6 support for the upcalls to the nfsuserd daemon.
Apr 6 2019, 9:53 PM
rmacklem closed D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.
Apr 6 2019, 9:53 PM
rmacklem added a comment to D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.

Marked rgrimes inline comments done per his request.

Apr 6 2019, 3:21 PM
rmacklem added a comment to D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.

Replied to the inline comments.

Apr 6 2019, 5:24 AM
rmacklem updated the diff for D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.

Oops, I think I uploaded the wrong version of the diff. Here is
the correct one with updated kernel changes that include #ifdef INET and INET6.

Apr 6 2019, 1:51 AM
rmacklem updated the diff for D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.

This version of the patch has an updated set of kernel changes
against head that include the #ifdef INET and INET6.

Apr 6 2019, 1:34 AM

Apr 4 2019

rmacklem committed rS345898: Add an entry to UPDATING for r345895, which affects the use of nfsuserd daemons.
Add an entry to UPDATING for r345895, which affects the use of nfsuserd daemons
Apr 4 2019, 11:40 PM
rmacklem committed rS345895: Revert r320698, since the related userland changes were reverted by r338192..
Revert r320698, since the related userland changes were reverted by r338192.
Apr 4 2019, 11:30 PM
rmacklem committed rS345866: Fix malloc stats for the RPCSEC_GSS server code when DEBUG is enabled..
Fix malloc stats for the RPCSEC_GSS server code when DEBUG is enabled.
Apr 4 2019, 1:23 AM

Apr 3 2019

rmacklem committed rS345828: Add a comment to the r345818 patch to explain why cl_refs is initialized to 2..
Add a comment to the r345818 patch to explain why cl_refs is initialized to 2.
Apr 3 2019, 3:50 AM

Apr 2 2019

rmacklem committed rS345818: Fix a race in the RPCSEC_GSS server code that caused crashes..
Fix a race in the RPCSEC_GSS server code that caused crashes.
Apr 2 2019, 11:51 PM

Mar 11 2019

rmacklem accepted D19458: Drop unused 'p' argument to nfsvno_link();.

Looks ok, rick

Mar 11 2019, 11:02 PM
rmacklem accepted D19457: Drop unused 'p' argument to nfsvno_rmdirsub();.

Looks ok, rick

Mar 11 2019, 11:01 PM
rmacklem accepted D19456: Drop unused 'p' argument to nfsvno_readlink();.

Looks ok, rick

Mar 11 2019, 11:01 PM
rmacklem accepted D19455: Drop unused 'p' argument to nfsrv_getuser()..

Looks ok, rick

Mar 11 2019, 11:00 PM
rmacklem accepted D19454: Drop unused 'p' argument to nfsvno_getfh()..

Looks ok, rick

Mar 11 2019, 10:59 PM
rmacklem accepted D19453: Drop unused 'p' argument to nfsrv_findlayout()..

Looks ok, rick

Mar 11 2019, 10:57 PM
rmacklem accepted D19452: Drop unused 'p' argument to nfsrv_checksequence()..

Looks ok, rick

Mar 11 2019, 10:56 PM
rmacklem accepted D19451: Drop unused 'p' argument to nfsvno_symlink()..

Looks ok, rick

Mar 11 2019, 10:55 PM
rmacklem accepted D19450: Drop unused 'p' argument to nfsvno_mkdir()..

Looks ok, rick

Mar 11 2019, 10:54 PM
rmacklem accepted D19449: Drop unused 'p' argument to nfsvno_mknod()..

Looks ok, rick

Mar 11 2019, 10:53 PM
rmacklem accepted D19448: Don't pass td to nfsvno_fillattr()..

Looks ok, rick

Mar 11 2019, 10:53 PM
rmacklem accepted D19447: Don't pass td to nfsrv_checkgetattr()..

Looks ok, rick

Mar 11 2019, 10:52 PM
rmacklem accepted D19445: Don't pass td to nfsrvd_mkdirsub() and nfsrvd_symlinksub()..

Looks ok, rick

Mar 11 2019, 10:51 PM
rmacklem accepted D19444: Don't pass td to nfsrv_opencheck()..

Looks ok, rick

Mar 11 2019, 10:50 PM
rmacklem accepted D19443: Don't pass td to nfsrv_pnfscreate()..

Loos ok, rick

Mar 11 2019, 10:48 PM
rmacklem accepted D19442: Push td down nfsvno_accchk()..

Looks ok, rick

Mar 11 2019, 10:46 PM

Mar 2 2019

rmacklem accepted D19417: Push down td in nfsrvd_dorpc()..

Look ok to me.

Mar 2 2019, 8:32 PM
rmacklem accepted D19419: Push down td in the NFS server code..

Looks ok. I'm not sure I understand why having a lot of "struct thread *p = curthread;"s in
the local variables of the functions is an improvement over passing it as an argument,
but I see no harm in it?

Mar 2 2019, 8:31 PM
rmacklem accepted D19421: Don't pass td to nfsd_fhtovp()..

Looks ok to me.

Mar 2 2019, 8:26 PM
rmacklem accepted D19423: Push td down into nfssvc_srvcall()..

Looks ok to me.

Mar 2 2019, 8:25 PM

Mar 1 2019

rmacklem added a comment to D19153: Handle SIGPIPE in gssd, and limit kgssapi RPC retries.

My concern is that all sorts of signals get posted to processes and you don't want any old
signal to interrupt an attempt at an upcall. The failure of a gssd should be a rare occurrence
and so long as the upcall doesn't try "forever", I think that will be sufficient.

Mar 1 2019, 11:44 PM
rmacklem added a comment to D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.

Yes, sometime in April I will revert the AF_LOCAL patch from head and then create an updated (simpler)
kernel patch, including the #ifdef INET/INET6.

Mar 1 2019, 11:19 PM

Feb 24 2019

rmacklem updated the diff for D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.

This patch has the .include <src.opts.mk> added to the Makefile and has the kernel
patch, which I was going to leave until later, but bz@ wanted to compile the code,
so here it is.
(Note that the kernel patch mostly replaces the AF_LOCAL socket code that is unused,
because the patch to nfsuserd.c for this was reverted and never MFC'd. As such, the kernel
changes won't apply to a stable branch and is only for head. I am planning on first reverting
the kernel change for AF_LOCAL and then applying the changes, so the patch that will be
committed to head for the kernel changes won't look the same as this patch, although the
post-commit code should look the same.)

Feb 24 2019, 10:35 PM
rmacklem updated the diff for D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.

Updated the patch with changes suggested by bz@. I did not change the usage
of INET6_LOOOPBACK_INIT, since I couldn't see an easy way to use it to initialize
a "struct sockaddr_storage". (There might be a C trick to using this initializer
that I don't know about.

Feb 24 2019, 2:35 AM

Feb 22 2019

rmacklem added a comment to D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.

Oops, my mistake. I didn't notice he had made multiple comments.
I see it now and will add the ifdefs.

Feb 22 2019, 10:45 PM
rmacklem added a comment to D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.

Whether or not "#ifdef INET6" and "#ifdef INET" should be in the code is still an open question.
I was hoping bz@ could answer this?
(I, personally, was of the understanding that this was no longer required/recommended for
FreeBSD sources. If bz@ does not know the correct answer for this, I will ask on freebsd-net@.)
At this point I have made no changes to the Makefile.
To build/run it, there is a small kernel change required, but I did not include that in this review.

Feb 22 2019, 12:44 AM

Feb 21 2019

rmacklem updated the diff for D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.

This version of the patch includes the changes that bz@ recommended.
I think he meant sockaddr_storage when he said sockaddr_union, so I
made "fromip" one of those instead of having both "fromip" and "fromip6"
plus "use_inet6" to decide which to use.
It uses INET6 if it can and uses the INADDR_LOOPBACK and IN6ADDR_LOOPBACK_INIT
macros.

Feb 21 2019, 3:06 AM

Feb 18 2019

rmacklem added a comment to D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.

W.r.t. the NFS root mount, you are sort of correct at this time.
What would happen for an NFSv4 root mount at this time is
that the NFS client code would have a miss on the "uid<->username"
cache and attempt an upcall to the nfsuserd, which would not
work. (I think it will eventually fail and use "nobody", but I'd have
to look at the code to be sure.
As such, NFSv4 root mounts are not currently recommended, but I
would like to resolve that someday.

Feb 18 2019, 3:39 PM
rmacklem updated the diff for D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.

Added a comment w.r.t. why "localhost" is hardcoded. I will also note that the kernel will
use these hardcoped values (I don't believe the kernel can do a name lookup and I wouldn't
want it to in this case), so the code doesn't want to use any other value, if a sysadmin were
to change the values for "localhost".

Feb 18 2019, 2:07 AM
rmacklem added a comment to D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.

The problem with doing a name lookup in this daemon is that it assumes/expects it
to work. Often (an NFS mounted root fs is one example and a system configured to
use DNS before the local /etc/hosts file) are not yet working and an NFS mount is
expected to work.
(ie. In general I'd agree with you, but for NFS not so much...)

Feb 18 2019, 1:22 AM

Feb 16 2019

rmacklem created D19218: fix nfsuserd to find a mapped "localhost" ip address and to use INET6 when INET isn't available.
Feb 16 2019, 10:50 PM

Feb 15 2019

rmacklem accepted D19191: Add support for a virtual hostname to nfsd.

Looks fine to me now. Thanks, rick

Feb 15 2019, 11:51 PM
rmacklem added a comment to D19191: Add support for a virtual hostname to nfsd.

Thanks for adding the strlen() check. I am going to be nitpicky and suggest an
error message be printed (not sure if the nfsd should fail or just log an error?),
since silently ignoring the "-V" argument could cause confusion too, I think?

Feb 15 2019, 2:54 PM
rmacklem accepted D19191: Add support for a virtual hostname to nfsd.

Looks ok to me. (I'll admit I don't understand when it is useful, but that's ok.;-)
The one change I might suggest is a sanity check for the strlen() of the "-V" optarg
being <= MAXHOSTNAMELEN.

Feb 15 2019, 12:02 AM

Feb 12 2019

rmacklem accepted D19153: Handle SIGPIPE in gssd, and limit kgssapi RPC retries.

This one looks fine to me, rick.

Feb 12 2019, 2:37 PM
rmacklem added a comment to D19153: Handle SIGPIPE in gssd, and limit kgssapi RPC retries.

First off, I should note that I am not the author of this code. If dfr@ could review this, that could be better.

Feb 12 2019, 1:41 AM

Dec 29 2018

rmacklem committed rS342582: Add an UPDATING entry for r342562..
Add an UPDATING entry for r342562.
Dec 29 2018, 12:06 AM
rmacklem committed rS342581: Add an UPDATING entry for r342561..
Add an UPDATING entry for r342561.
Dec 29 2018, 12:01 AM

Dec 28 2018

rmacklem committed rS342562: MFC: r342286.
MFC: r342286
Dec 28 2018, 12:26 AM
rmacklem committed rS342561: MFC: r342286.
MFC: r342286
Dec 28 2018, 12:10 AM

Dec 20 2018

rmacklem committed rS342287: Add an UPDATING message for r342286..
Add an UPDATING message for r342286.
Dec 20 2018, 10:27 PM
rmacklem committed rS342286: Fix the NFSv4 server to obey vfs.nfsd.nfs_privport..
Fix the NFSv4 server to obey vfs.nfsd.nfs_privport.
Dec 20 2018, 10:21 PM

Dec 18 2018

rmacklem committed rS342186: Delete an unneeded statement, since "tl" isn't used after this line..
Delete an unneeded statement, since "tl" isn't used after this line.
Dec 18 2018, 6:09 AM

Dec 17 2018

rmacklem committed rS342155: Merge in an up to date kernel from head..
Merge in an up to date kernel from head.
Dec 17 2018, 12:34 AM

Dec 1 2018

rmacklem accepted D18393: Add kern.rpc.gss.client_max.

Looks fine to me, although I'll admit I've never noticed there was a CLIENT_MAX in this code.
(I wasn't the author.)

Dec 1 2018, 1:09 AM

Nov 23 2018

rmacklem committed rS340787: Make sure the NFS readdir client fills in all "struct dirent" data..
Make sure the NFS readdir client fills in all "struct dirent" data.
Nov 23 2018, 12:17 AM

Nov 20 2018

rmacklem committed rS340663: Improve sanity checking for the dircount hint argument to.
Improve sanity checking for the dircount hint argument to
Nov 20 2018, 2:00 AM
rmacklem committed rS340662: nfsm_advance() would panic() when the offs argument was negative..
nfsm_advance() would panic() when the offs argument was negative.
Nov 20 2018, 1:56 AM
rmacklem committed rS340661: r304026 added code that started statistics gathering for an operation.
r304026 added code that started statistics gathering for an operation
Nov 20 2018, 1:52 AM

Nov 19 2018

rmacklem committed rS340590: MFC: r339999.
MFC: r339999
Nov 19 2018, 12:49 AM

Nov 18 2018

rmacklem committed rS340589: MFC: r339999.
MFC: r339999
Nov 18 2018, 11:48 PM
rmacklem committed rS340588: MFC: r339999.
MFC: r339999
Nov 18 2018, 11:00 PM

Nov 12 2018

rmacklem added a comment to D17917: d_off support for multiple filesystems.

Added an inline suggestion related to the man page update.

Nov 12 2018, 4:02 PM
rmacklem accepted D17917: d_off support for multiple filesystems.

Assuming you resolve the man page issue that kib@ has commented on, this looks ok to me.

Nov 12 2018, 3:49 PM
rmacklem committed rS340357: Add support for the NFSv4.2 IOAdvise RPC to sys/fs/nfsclient..
Add support for the NFSv4.2 IOAdvise RPC to sys/fs/nfsclient.
Nov 12 2018, 12:42 AM
rmacklem committed rS340356: Add NFSv4.2 client support for VOP_ADVISE() to sys/fs/nfs. Changes to.
Add NFSv4.2 client support for VOP_ADVISE() to sys/fs/nfs. Changes to
Nov 12 2018, 12:24 AM
rmacklem committed rS340355: Update the kernel to a current one from head..
Update the kernel to a current one from head.
Nov 12 2018, 12:07 AM

Nov 9 2018

rmacklem added a comment to D17917: d_off support for multiple filesystems.

I can't seem to remember how to do inline comments (if I ever knew), so I'll stick it here...

Nov 9 2018, 11:33 PM

Nov 6 2018

rmacklem committed rS340207: Change nfs_advlock() so that the NFSVOPUNLOCK() is mostly done at the end..
Change nfs_advlock() so that the NFSVOPUNLOCK() is mostly done at the end.
Nov 6 2018, 10:51 PM
rmacklem closed D17853: recode nfs_advlock() so that it does "goto out" instead of many return()s. No semantic change..
Nov 6 2018, 10:51 PM
rmacklem added a comment to D17839: add a global file system mount option called "fsid" that overrides the file system's choice of fsid.

W.r.t. ZFS, I have no idea. It appears that it would need to be a temporary property, but I can't see how/where
those get added?

Nov 6 2018, 2:27 AM
rmacklem added a comment to D17853: recode nfs_advlock() so that it does "goto out" instead of many return()s. No semantic change..

nfs_dolock() is the front end for the NLM stuff, which I know nothing about.
I'll try emailing dfr@ and see if he can tell me what locking is required.
(You might have noticed that I don't have much use for the NLM;-)

Nov 6 2018, 2:03 AM
rmacklem created D17853: recode nfs_advlock() so that it does "goto out" instead of many return()s. No semantic change..
Nov 6 2018, 12:41 AM

Nov 5 2018

rmacklem added a comment to D17839: add a global file system mount option called "fsid" that overrides the file system's choice of fsid.

Added an inline comment.

Nov 5 2018, 1:45 AM
rmacklem added a comment to D17839: add a global file system mount option called "fsid" that overrides the file system's choice of fsid.

Added two inline comments.

Nov 5 2018, 12:06 AM

Nov 4 2018

rmacklem created D17839: add a global file system mount option called "fsid" that overrides the file system's choice of fsid.
Nov 4 2018, 11:38 PM

Nov 1 2018

rmacklem committed rS339999: Fix NFS client vnode locking to avoid a crash during forced dismount..
Fix NFS client vnode locking to avoid a crash during forced dismount.
Nov 1 2018, 3:27 PM
rmacklem closed D17757: fix NFS client advisory locking when a forced dismount is performed.
Nov 1 2018, 3:27 PM

Oct 31 2018

rmacklem added a comment to D17757: fix NFS client advisory locking when a forced dismount is performed.

Hmm, not sure. If you look at the code near the end of nfs_advlock() { around line#3100-3120 in head's sys/fs/nfsclient/nfs_clvnops.c } that isn't really
shown in the patch, then where the vnode gets VOP_UNLOCK()'d gets more convoluted. Such as before the lf_advlock() call.
I could do an errout: case so that many of the VOP_UNLOCK(); return(X); cases could become error = X; goto errout; but I'm not sure that
makes the code more readable.
If you think it does make it more readable, let me know and I'll change it.
{ Some like single return points and others don't like goto's. I have no strong opinion w.r.t. this. }

Oct 31 2018, 3:27 AM

Oct 30 2018

rmacklem created D17757: fix NFS client advisory locking when a forced dismount is performed.
Oct 30 2018, 12:19 AM

Oct 9 2018

rmacklem committed rS339247: Fix the pNFS server's reporting of disk space usage for the "#<path>" case..
Fix the pNFS server's reporting of disk space usage for the "#<path>" case.
Oct 9 2018, 1:11 AM

Sep 24 2018

rmacklem committed rS338900: Add a sanity check for v_type == VREG to the NFSv4.2 IO Advise operation..
Add a sanity check for v_type == VREG to the NFSv4.2 IO Advise operation.
Sep 24 2018, 12:54 AM

Sep 23 2018

rmacklem committed rS338895: Add the IO Advise operation to the NFSv4.2 server. At this time, it only.
Add the IO Advise operation to the NFSv4.2 server. At this time, it only
Sep 23 2018, 2:17 AM

Sep 20 2018

rmacklem committed rS338817: Add the Layout stats operation to the NFSv4.2 server..
Add the Layout stats operation to the NFSv4.2 server.
Sep 20 2018, 12:27 AM