Page MenuHomeFreeBSD

rmacklem (Rick Macklem)
User

Projects

User Details

User Since
Jan 13 2015, 10:58 PM (607 w, 1 d)

Recent Activity

Tue, Sep 1

rmacklem committed rGcc352a850f98: nfs_clvfsops.c: Fix the non-VIMAGE build (authored by rmacklem).
nfs_clvfsops.c: Fix the non-VIMAGE build
Tue, Sep 1, 5:35 PM
rmacklem committed rGf41d83578e8e: nfsclient: Fix problems with the NFS over RDMA glue (authored by rmacklem).
nfsclient: Fix problems with the NFS over RDMA glue
Tue, Sep 1, 2:07 PM

Mon, Aug 31

rmacklem committed rG9bec8a959bd6: RELNOTES: Add an entry for the NFS over RDMA "glue" commits (authored by rmacklem).
RELNOTES: Add an entry for the NFS over RDMA "glue" commits
Mon, Aug 31, 2:03 AM
rmacklem committed rGd8d9f39df543: nfs_clvfsops.c: Silence a compiler warning (authored by rmacklem).
nfs_clvfsops.c: Silence a compiler warning
Mon, Aug 31, 12:59 AM

Sun, Aug 30

rmacklem added a comment to D59278: nfsclrdma.ko: Client side NFS over RDMA module.

Oh, I should have noted that I either wrote the code
or cribbed it from Linux sources that carry the same
dual license as the OFED sources.

Sun, Aug 30, 10:48 PM
rmacklem requested review of D59278: nfsclrdma.ko: Client side NFS over RDMA module.
Sun, Aug 30, 10:46 PM
rmacklem committed rG8ee0a615cb23: nfsclient: Add a new nfs_client_rdma_enable variable (authored by rmacklem).
nfsclient: Add a new nfs_client_rdma_enable variable
Sun, Aug 30, 10:13 PM
rmacklem committed rG884ee8d6c9b4: nfscl: Add some glue for client side NFS over RDMA (authored by rmacklem).
nfscl: Add some glue for client side NFS over RDMA
Sun, Aug 30, 10:03 PM
rmacklem committed rGa311bd18a6fb: krpc: Add some glue for client side NFS over RDMA (authored by rmacklem).
krpc: Add some glue for client side NFS over RDMA
Sun, Aug 30, 9:34 PM

Wed, Aug 26

rmacklem committed rGc54fbc9e839b: chflags.1: Change dontcache to nocache (authored by rmacklem).
chflags.1: Change dontcache to nocache
Wed, Aug 26, 10:22 PM
rmacklem committed rG290e563166b4: chflags: Add a new UF_NOCACHE flag (authored by rmacklem).
chflags: Add a new UF_NOCACHE flag
Wed, Aug 26, 9:58 PM

Tue, Aug 18

rmacklem added a comment to D58851: vm_object_take_pages_for_io(9).
In D58851#1352085, @kib wrote:
In D58851#1351758, @kib wrote:

I looked more carefully at the issue of the interaction between vm_fault_quickXXX() and map_remove_YYY(). It could be implemented using the observation that when pmap_extract_and_hold() succeeds but the resulting page is busy, we should fall back to the vm_fault_hold() path for that page. This requires some kind of interlock between the busy state and wiring.

I even started implementing it, but then I considered what would be the consequence of not implementing. Basically, to get advantage of that situation, userspace needs to construct some situation. For instance, it needs to map a file shared, and then do read(2) from pipe into the mapping. Similarly, for physio. IMO if userspace is so much dedicated to cause this inconsistency, we might allow it. The VM code is simpler, and user is causing only self-inflicted damage. I do not see a problem with it.

On the other hand, the pmap_remove_all/write() calls make the regular file io with read(2) or write(2), or normal userspace writes through the mapping, atomic with regard to the NFS over RDMA io RPCs. I believe it is good enough.

Well, if this interface is not used, the NFS server does a..
VOP_READ() with a shared vnode lock
or
VOP_WRITE() with either a shared or exclusively locked vnode

(depending on whether the fs sets MNTK_SHARED_WRITES)

No range locking.

So, ideally, this interface would provide the same semantics.
If not, someone, someday, will go "when I mount rdma this weird.. happens".
I don't see that when I do a tcp mount.

What I discussed above is not about the range locking. It is about some very specific user buffer configurations that probably cannot be created by real applications, and cannot be utilized for any useful work. Also, I believe that the issue is not limited to the proposed interface, but also exists e.g. for buffered reads. My point is that it does not corrupt the kernel state, and is irrelevant practically for correctness.

Tue, Aug 18, 11:53 PM
rmacklem added a comment to D58851: vm_object_take_pages_for_io(9).
In D58851#1351758, @kib wrote:

I looked more carefully at the issue of the interaction between vm_fault_quickXXX() and map_remove_YYY(). It could be implemented using the observation that when pmap_extract_and_hold() succeeds but the resulting page is busy, we should fall back to the vm_fault_hold() path for that page. This requires some kind of interlock between the busy state and wiring.

I even started implementing it, but then I considered what would be the consequence of not implementing. Basically, to get advantage of that situation, userspace needs to construct some situation. For instance, it needs to map a file shared, and then do read(2) from pipe into the mapping. Similarly, for physio. IMO if userspace is so much dedicated to cause this inconsistency, we might allow it. The VM code is simpler, and user is causing only self-inflicted damage. I do not see a problem with it.

On the other hand, the pmap_remove_all/write() calls make the regular file io with read(2) or write(2), or normal userspace writes through the mapping, atomic with regard to the NFS over RDMA io RPCs. I believe it is good enough.

Tue, Aug 18, 1:16 PM

Mon, Aug 17

rmacklem added a comment to D58851: vm_object_take_pages_for_io(9).
In D58851#1351260, @kib wrote:

IOMMU has nothing to do with this function. It does not even look into the bus address space.

Oops, I confused this with what I need for the client, which is your _bus_dmamap_load_ma[] that maps pages to
configuous dma space.

Mon, Aug 17, 12:27 PM
rmacklem added a comment to D58851: vm_object_take_pages_for_io(9).

If it isn't hard to do, it would be nice if vm_object_take_pages_for_io()
had a flag option that indicated if it should return failure if there is
no IOMMU hardware. (Or is there an easy way for the caller to check
before calling this function?)

Mon, Aug 17, 1:41 AM

Sat, Aug 15

rmacklem committed rG3ce28106a887: rc.conf: Fix the default NFS-over-RDMA port number (authored by Vinicius Ferrao <ferrao@versatuphpc.com.br>).
rc.conf: Fix the default NFS-over-RDMA port number
Sat, Aug 15, 9:30 PM

Fri, Aug 14

rmacklem committed rG471e14267bea: nfsd: Update the rc.d script for RDMA for the nfsd service (authored by rmacklem).
nfsd: Update the rc.d script for RDMA for the nfsd service
Fri, Aug 14, 7:58 PM
rmacklem committed rG7144a1d58c5c: nfsd: Add glue for the nfsrdma.ko module (authored by rmacklem).
nfsd: Add glue for the nfsrdma.ko module
Fri, Aug 14, 3:01 PM

Thu, Aug 6

rmacklem committed rGbdea6e971844: nfs_commonkrpc.c: Get rid of NFSv4.0 delegation cruft (authored by rmacklem).
nfs_commonkrpc.c: Get rid of NFSv4.0 delegation cruft
Thu, Aug 6, 7:54 PM
rmacklem committed rGca0dcfd1a8ec: nfs_commonkrpc.c: Fix recovery that was broken by 4d80d4913e79 (authored by rmacklem).
nfs_commonkrpc.c: Fix recovery that was broken by 4d80d4913e79
Thu, Aug 6, 7:53 PM
rmacklem committed rG6154eec89acb: nfs_commonkrpc.c: Get rid of NFSv4.0 delegation cruft (authored by rmacklem).
nfs_commonkrpc.c: Get rid of NFSv4.0 delegation cruft
Thu, Aug 6, 7:48 PM
rmacklem committed rG037232c20015: nfs_commonkrpc.c: Fix recovery that was broken by 4d80d4913e79 (authored by rmacklem).
nfs_commonkrpc.c: Fix recovery that was broken by 4d80d4913e79
Thu, Aug 6, 7:47 PM

Tue, Aug 4

rmacklem committed rG8f20299b473a: nfs_commonkrpc.c: Get rid of NFSv4.0 delegation cruft (authored by rmacklem).
nfs_commonkrpc.c: Get rid of NFSv4.0 delegation cruft
Tue, Aug 4, 3:57 PM

Aug 4 2026

rmacklem committed rG5ab48fb9f7ac: nfs_commonkrpc.c: Fix recovery that was broken by 4d80d4913e79 (authored by rmacklem).
nfs_commonkrpc.c: Fix recovery that was broken by 4d80d4913e79
Aug 4 2026, 12:10 AM

Aug 3 2026

rmacklem committed rG3393002307ad: nfs_commonkrpc.c: Handle NFSERR_DELAY for Sequence correctly (authored by rmacklem).
nfs_commonkrpc.c: Handle NFSERR_DELAY for Sequence correctly
Aug 3 2026, 1:11 AM
rmacklem committed rG25d1f68e513b: nfs_commonkrpc.c: Handle NFSERR_DELAY for Sequence correctly (authored by rmacklem).
nfs_commonkrpc.c: Handle NFSERR_DELAY for Sequence correctly
Aug 3 2026, 1:05 AM

Jul 28 2026

rmacklem committed rG575af5e2fa38: RELNOTES: Add an entry for pNFS server improvements (authored by rmacklem).
RELNOTES: Add an entry for pNFS server improvements
Jul 28 2026, 1:53 AM

Jul 27 2026

rmacklem committed rG6901cbbd5a2c: nfs_commonkrpc.c: Handle NFSERR_DELAY for Sequence correctly (authored by rmacklem).
nfs_commonkrpc.c: Handle NFSERR_DELAY for Sequence correctly
Jul 27 2026, 2:18 PM

Jul 25 2026

rmacklem committed rG8200466be682: nfsd: Commit missing patches for c52bcd09c2a6 (authored by rmacklem).
nfsd: Commit missing patches for c52bcd09c2a6
Jul 25 2026, 1:32 AM
rmacklem committed rG5d5b759f4cb7: nfsd: Garbage collect stray NFSv4 state (authored by rmacklem).
nfsd: Garbage collect stray NFSv4 state
Jul 25 2026, 1:32 AM
rmacklem committed rG508af47d2f9f: nfsd: Commit missing patches for c52bcd09c2a6 (authored by rmacklem).
nfsd: Commit missing patches for c52bcd09c2a6
Jul 25 2026, 1:22 AM
rmacklem committed rG3ad71ccbc58f: nfsd: Garbage collect stray NFSv4 state (authored by rmacklem).
nfsd: Garbage collect stray NFSv4 state
Jul 25 2026, 1:22 AM

Jul 21 2026

rmacklem committed rG94b21dade677: nfsd: Optionally enable use of M_EXTPG mbufs for read replies (authored by rmacklem).
nfsd: Optionally enable use of M_EXTPG mbufs for read replies
Jul 21 2026, 1:28 AM

Jul 20 2026

rmacklem committed rG55b9f788d348: acl_from_text.c: Allow negative uid/gid numbers to be handled (authored by pen_lysator.liu.se).
acl_from_text.c: Allow negative uid/gid numbers to be handled
Jul 20 2026, 1:49 AM

Jul 18 2026

rmacklem committed rGa51fdce1b28a: nfs_clstate.c: Fix handling of delegation upgrades (authored by rmacklem).
nfs_clstate.c: Fix handling of delegation upgrades
Jul 18 2026, 1:39 AM
rmacklem committed rG299bbb762db7: nfs_clstate.c: Fix handling of delegation upgrades (authored by rmacklem).
nfs_clstate.c: Fix handling of delegation upgrades
Jul 18 2026, 1:17 AM

Jul 13 2026

rmacklem added a reverting change for rG74654ba3b1b3: chflags: Add a new UF_DONTCACHE flag: rG88711f144170: Revert "chflags: Add a new UF_DONTCACHE flag".
Jul 13 2026, 3:02 AM
rmacklem committed rG88711f144170: Revert "chflags: Add a new UF_DONTCACHE flag" (authored by rmacklem).
Revert "chflags: Add a new UF_DONTCACHE flag"
Jul 13 2026, 3:02 AM
rmacklem added a reverting change for D58181: chflags: Add a new UF_DONTCACHE flag: rG88711f144170: Revert "chflags: Add a new UF_DONTCACHE flag".
Jul 13 2026, 3:02 AM
rmacklem added a comment to D58181: chflags: Add a new UF_DONTCACHE flag.
In D58181#1334837, @fuz wrote:

This would have been nicer if the flag was named "noucache" with inverse
semantics as with nodump. (so "ucache" to turn it off)
nodontcache is a weird double negation.

Maybe this can still be revised?

Jul 13 2026, 1:07 AM

Jul 12 2026

rmacklem committed rG4830670a3f94: chflags.1: Document the new UF_DONTCACHE flag (authored by rmacklem).
chflags.1: Document the new UF_DONTCACHE flag
Jul 12 2026, 10:59 PM
rmacklem committed rG74654ba3b1b3: chflags: Add a new UF_DONTCACHE flag (authored by rmacklem).
chflags: Add a new UF_DONTCACHE flag
Jul 12 2026, 10:47 PM
rmacklem closed D58181: chflags: Add a new UF_DONTCACHE flag.
Jul 12 2026, 10:47 PM
rmacklem requested review of D58181: chflags: Add a new UF_DONTCACHE flag.
Jul 12 2026, 1:13 AM

Jul 11 2026

rmacklem committed rG30d4d3db431a: nfsd: Commit missing patches for c52bcd09c2a6 (authored by rmacklem).
nfsd: Commit missing patches for c52bcd09c2a6
Jul 11 2026, 7:34 PM
rmacklem committed rGc52bcd09c2a6: nfsd: Garbage collect stray NFSv4 state (authored by rmacklem).
nfsd: Garbage collect stray NFSv4 state
Jul 11 2026, 3:52 PM
rmacklem committed rGf28c41843a65: nfs_clstate.c: Fix CB_RECALL handling for NFSv4.1/4.2 (authored by rmacklem).
nfs_clstate.c: Fix CB_RECALL handling for NFSv4.1/4.2
Jul 11 2026, 1:07 AM
rmacklem committed rGd2b2fac918a4: nfs_clstate.c: Fix CB_RECALL handling for NFSv4.1/4.2 (authored by rmacklem).
nfs_clstate.c: Fix CB_RECALL handling for NFSv4.1/4.2
Jul 11 2026, 1:03 AM

Jul 7 2026

rmacklem committed rGd516e52373e1: nfsd: Optionally enable use of M_EXTPG mbufs for read replies (authored by rmacklem).
nfsd: Optionally enable use of M_EXTPG mbufs for read replies
Jul 7 2026, 12:12 AM

Jul 6 2026

rmacklem committed rGd7d71341ae7d: acl_from_text.c: Allow negative uid/gid numbers to be handled (authored by pen_lysator.liu.se).
acl_from_text.c: Allow negative uid/gid numbers to be handled
Jul 6 2026, 7:36 PM
rmacklem closed D57180: Allow setfacl / acl_from_text() to handle negative uid / gid numbers in user/group ACL entries.
Jul 6 2026, 7:36 PM
rmacklem accepted D58053: vfs: Fix resource leaks in kern_symlinkat().
Jul 6 2026, 3:19 PM

Jul 5 2026

rmacklem committed rG0c48190463a5: gss_impl.c: Fix a nfsd hang when the kgssapi.ko is loaded, but no gssd (authored by rmacklem).
gss_impl.c: Fix a nfsd hang when the kgssapi.ko is loaded, but no gssd
Jul 5 2026, 11:05 PM

Jul 4 2026

rmacklem committed rGfe6677e7f440: nfs_clstate.c: Fix handling of delegation upgrades (authored by rmacklem).
nfs_clstate.c: Fix handling of delegation upgrades
Jul 4 2026, 10:02 PM

Jul 2 2026

rmacklem committed rG0b9f4c6b0a03: nfs_nfsdserv.c: Fix setting of birthtime for some ZFS pools (authored by rmacklem).
nfs_nfsdserv.c: Fix setting of birthtime for some ZFS pools
Jul 2 2026, 1:21 AM
rmacklem committed rG76badd25811e: nfs_nfsdserv.c: Fix setting of birthtime for some ZFS pools (authored by rmacklem).
nfs_nfsdserv.c: Fix setting of birthtime for some ZFS pools
Jul 2 2026, 1:16 AM

Jul 1 2026

rmacklem accepted D57982: ffs: do not return ESTALE on attempt to ffs_unotovp() on unlinked inode.

In the NFS game there are two things...

  • The RFCs. They don't define exactly when an NFS server should return ESTALE, so I don't think either the current behaviour or the behaviour with this patch is incorrect.
  • Linux. It has become the "defacto standard" for NFS. (Solaris once was the "defacto standard" but??)

So, if this patch results in behaviour consistent with
Linux, I think it is reasonable to do.

Jul 1 2026, 2:41 AM

Jun 27 2026

rmacklem committed rG9e1bbfb88e98: nfs_clstate.c: Fix CB_RECALL handling for NFSv4.1/4.2 (authored by rmacklem).
nfs_clstate.c: Fix CB_RECALL handling for NFSv4.1/4.2
Jun 27 2026, 11:37 PM

Jun 26 2026

rmacklem committed rGae9f66486df6: nfs_commonkrpc.c: Improve handling of NFSv4.1/4.2 recovery (authored by rmacklem).
nfs_commonkrpc.c: Improve handling of NFSv4.1/4.2 recovery
Jun 26 2026, 1:41 AM
rmacklem committed rGafc113696ff6: nfs_commonkrpc.c: Improve handling of NFSv4.1/4.2 recovery (authored by rmacklem).
nfs_commonkrpc.c: Improve handling of NFSv4.1/4.2 recovery
Jun 26 2026, 1:37 AM
rmacklem committed rG28ae0d849118: nfs: Fix argument typo to avoid a crash (authored by rmacklem).
nfs: Fix argument typo to avoid a crash
Jun 26 2026, 1:36 AM
rmacklem committed rG84043284ad1f: nfs: Fix argument typo to avoid a crash (authored by rmacklem).
nfs: Fix argument typo to avoid a crash
Jun 26 2026, 1:31 AM
rmacklem committed rGfe7426b2c9f7: nfs_nfsdport.c: Fix a typo in a KASSERT (authored by rmacklem).
nfs_nfsdport.c: Fix a typo in a KASSERT
Jun 26 2026, 12:57 AM

Jun 25 2026

rmacklem committed rG3a3d12112483: nfs_clvnops.c: Fix the case where va_flags are being cleared (authored by rmacklem).
nfs_clvnops.c: Fix the case where va_flags are being cleared
Jun 25 2026, 12:50 AM

Jun 23 2026

rmacklem committed rGcf523f4beb8f: nfscl: Add support for flexible file layout striping (authored by rmacklem).
nfscl: Add support for flexible file layout striping
Jun 23 2026, 1:23 AM

Jun 21 2026

rmacklem committed rG455c354dd4db: gss_impl.c: Fix a nfsd hang when the kgssapi.ko is loaded, but no gssd (authored by rmacklem).
gss_impl.c: Fix a nfsd hang when the kgssapi.ko is loaded, but no gssd
Jun 21 2026, 11:17 PM
rmacklem closed D57455: gss_impl.c: Fix a nfsd hang when kgssapi.ko is loaded, but gssd not running.
Jun 21 2026, 11:17 PM
rmacklem added a comment to D57455: gss_impl.c: Fix a nfsd hang when kgssapi.ko is loaded, but gssd not running.

I also updated the comment in kgss_load().

Jun 21 2026, 3:46 PM
rmacklem committed rGc57fab60daeb: nfs_nfsdstate.c: Another unnecessary initialization for gcc (authored by rmacklem).
nfs_nfsdstate.c: Another unnecessary initialization for gcc
Jun 21 2026, 2:45 PM
rmacklem committed rGfa515f60fce0: nfs_nfsdport.c: One more unnecessary initialization for gcc (authored by rmacklem).
nfs_nfsdport.c: One more unnecessary initialization for gcc
Jun 21 2026, 2:55 AM
rmacklem committed rG61152df00aee: nfs_nfsdport.c: Do unnecessary initializations to quiet gcc (authored by rmacklem).
nfs_nfsdport.c: Do unnecessary initializations to quiet gcc
Jun 21 2026, 12:09 AM

Jun 20 2026

rmacklem committed rGd8e8f9251975: pNFSd: Add a directory of newly created files for the pNFSd (authored by rmacklem).
pNFSd: Add a directory of newly created files for the pNFSd
Jun 20 2026, 6:46 PM
rmacklem closed D57554: pNFSd: Add a directory of newly created files for the pNFSd.
Jun 20 2026, 6:46 PM
rmacklem added inline comments to D57681: vfs: rename vop_mmapped() to vop_update_atime().
Jun 20 2026, 12:21 AM

Jun 19 2026

rmacklem accepted D57681: vfs: rename vop_mmapped() to vop_update_atime().
Jun 19 2026, 10:50 PM
rmacklem added a comment to D57681: vfs: rename vop_mmapped() to vop_update_atime().
In D57681#1322466, @kib wrote:

This looks ok to me, although I'll admit I am not
conversant with UFS semantics, so I'll leave that
to others.

All existing callers pass tsa == NULL, so the intent is that the semantic does not change.
It is the question whether your case is served when tsa != NULL is provided.

I guess it does. I don't know UFS, but it does seem "inefficient" to first do
UFS_INODE_SET_FLAG_SHARED(), which locks/unlocks the vnode interlock and
then call ufs_itimes(), which locks the vnode interlock again and calls ufs_itimes_locked().

Jun 19 2026, 9:37 PM
rmacklem accepted D57681: vfs: rename vop_mmapped() to vop_update_atime().

This looks ok to me, although I'll admit I am not
conversant with UFS semantics, so I'll leave that
to others.

Jun 19 2026, 8:53 PM
rmacklem added a comment to D57681: vfs: rename vop_mmapped() to vop_update_atime().
In D57681#1322365, @kib wrote:

What is not clear to me, should ufs_itimes() only use the passed timespec for atime update, or it shall be used for all times as I did in the initial version of the patch.
Perhaps this is the question to Rick, since I believe the only caller with tsa != NULL would be nfs server.

Jun 19 2026, 8:10 PM

Jun 18 2026

rmacklem added inline comments to D57554: pNFSd: Add a directory of newly created files for the pNFSd.
Jun 18 2026, 9:43 PM
rmacklem updated the diff for D57554: pNFSd: Add a directory of newly created files for the pNFSd.

Made changes as suggested by kib@.

Jun 18 2026, 9:35 PM
rmacklem committed rGb1af05406b51: nfs_nfsdserv.c: Fix setting of birthtime for some ZFS pools (authored by rmacklem).
nfs_nfsdserv.c: Fix setting of birthtime for some ZFS pools
Jun 18 2026, 3:47 PM
rmacklem committed rG572680712c31: nfs_clvnops.c: Fix the case where va_flags are being cleared (authored by rmacklem).
nfs_clvnops.c: Fix the case where va_flags are being cleared
Jun 18 2026, 12:38 AM

Jun 17 2026

rmacklem added inline comments to D57554: pNFSd: Add a directory of newly created files for the pNFSd.
Jun 17 2026, 4:12 PM
rmacklem updated the diff for D57554: pNFSd: Add a directory of newly created files for the pNFSd.

Changed return value to EBUSY when the nfsd
are running and got rid of the locking around
reading the list head, as suggested by markj@.

Jun 17 2026, 4:07 PM

Jun 16 2026

rmacklem added a reverting change for rG7a289fe3cd5c: rpc.tlsservd.c: Pin max threads at 1 for now: rG62e7ac83ae14: Revert "rpc.tlsservd.c: Pin max threads at 1 for now".
Jun 16 2026, 4:18 PM
rmacklem committed rG62e7ac83ae14: Revert "rpc.tlsservd.c: Pin max threads at 1 for now" (authored by rmacklem).
Revert "rpc.tlsservd.c: Pin max threads at 1 for now"
Jun 16 2026, 4:18 PM
rmacklem committed rG2e6615b26bb5: netexport: Move struct netexport in a .h file and refcnt it (authored by rmacklem).
netexport: Move struct netexport in a .h file and refcnt it
Jun 16 2026, 3:38 PM
rmacklem closed D57553: netexport: Move struct netexport into a .h file and refcnt it.
Jun 16 2026, 3:37 PM
rmacklem added inline comments to D57553: netexport: Move struct netexport into a .h file and refcnt it.
Jun 16 2026, 12:34 AM
rmacklem updated the diff for D57553: netexport: Move struct netexport into a .h file and refcnt it.

Add vfs_netexport_reset() as suggested by markj@.
Also, add KASSERT()s to check ne_ref > 0.

Jun 16 2026, 12:32 AM

Jun 15 2026

rmacklem added a comment to D57555: rpcsec_tls: Avoid a socket reference underflow in rpctls_server().

Mark, again thanks a lot for fixing my bug that I was too slow (extremely slow!) to fix. I feel shame for that. Rick, very sorry for delaying looking into the problem for two months.

Jun 15 2026, 3:12 PM
rmacklem added a comment to D57554: pNFSd: Add a directory of newly created files for the pNFSd.
In D57554#1320166, @kib wrote:

Do you need a kernel thread and code to create the placeholder files? Could it be done in userspace?

Jun 15 2026, 1:21 PM

Jun 14 2026

rmacklem updated the diff for D57554: pNFSd: Add a directory of newly created files for the pNFSd.

Updated with changes recommended by markj@
and kib@. Mostly removal of unnecessary locking
calls, plus a couple of important typo fixes.

Jun 14 2026, 10:36 PM
rmacklem updated the diff for D57553: netexport: Move struct netexport into a .h file and refcnt it.

Added vfs_netexport_acquire() as suggested by markj@
and renamed vfs_netexport_free() to vfs_netexport_release(),
since that seemed more consistent.

Jun 14 2026, 10:30 PM
rmacklem added inline comments to D57554: pNFSd: Add a directory of newly created files for the pNFSd.
Jun 14 2026, 8:35 PM
rmacklem accepted D57555: rpcsec_tls: Avoid a socket reference underflow in rpctls_server().

This looks fine to me and seemed to behave when I
tested with lotsa printf()s.

Jun 14 2026, 8:23 PM
rmacklem added a comment to D57555: rpcsec_tls: Avoid a socket reference underflow in rpctls_server().

Ok, so I finally think I remember how this works;-)
Your patch tests out well, but I think it needs something like the following:

  • sys/rpc/rpcsec_tls/rpctls_impl.c.yyy 2026-06-14 09:08:45.910463000 -0700

+++ sys/rpc/rpcsec_tls/rpctls_impl.c 2026-06-14 09:01:06.722976000 -0700
@@ -298,8 +298,18 @@ printf("rpctls_connect soref so=%p\n", so);

	stat = rpctlscd_connect_2(&arg, &res, rpctls_connect_handle);
	if (stat == RPC_SUCCESS)
		*reterr = res.reterr;
  • else

+ else {
+ struct ct_data *ct = (struct ct_data *)newclient->cl_private;
+
+printf("clnt at rpctls_rpc_failed so=%p\n", so);

		rpctls_rpc_failed(&ups, so);

+ /*
+ * Since rpctls_rpc_failed() will do a soclose() if the
+ * daemon is not running, set ct_tlsstate to avoid doing
+ * a close in clnt_vc_destroy().
+ */
+ ct->ct_tlsstate = RPCTLS_INHANDSHAKE;
+ }

Jun 14 2026, 4:19 PM
rmacklem added a comment to D57555: rpcsec_tls: Avoid a socket reference underflow in rpctls_server().

Ok, so now I see what you've done. You are now taking the
soref() when it is inserted in the RB tree instead of when it
is taken out.

I suspect the "else" case in rpctls_rpc_failed() needs a
sorele() along with the soshutdown(), to get rid of the
reference.

Now that I am testing it, this does not seem to be needed.
(You get to the "else" case if rpc.tlsservd is running on the
server and you use your little tls_trigger.c test against it.)

Jun 14 2026, 3:04 PM
rmacklem added a comment to D57554: pNFSd: Add a directory of newly created files for the pNFSd.

Once I've put it through some testing, I'll update the patch.

Jun 14 2026, 2:16 PM
rmacklem added a comment to D57555: rpcsec_tls: Avoid a socket reference underflow in rpctls_server().

Ok, so now I see what you've done. You are now taking the
soref() when it is inserted in the RB tree instead of when it
is taken out.

Jun 14 2026, 12:22 AM