Page MenuHomeFreeBSD

Make NFS server aware of mnt_renamelock
ClosedPublic

Authored by kib on Jul 8 2025, 7:57 PM.
Tags
None
Referenced Files
F131945869: D51211.id.diff
Sun, Oct 12, 10:05 AM
F131945865: D51211.id158229.diff
Sun, Oct 12, 10:05 AM
F131945863: D51211.id158184.diff
Sun, Oct 12, 10:05 AM
F131945859: D51211.id158197.diff
Sun, Oct 12, 10:05 AM
Unknown Object (File)
Sat, Oct 11, 11:11 PM
Unknown Object (File)
Mon, Sep 15, 7:11 AM
Unknown Object (File)
Sun, Sep 14, 9:55 AM
Unknown Object (File)
Sep 12 2025, 1:41 PM
Subscribers

Details

Summary
nfsvno_rename(): do not use -1 as special error indicator

it clashes with ERESTART.  Use EJUSTRETURN for the case, as it is often
done in other places in the kernel.


nfsserver rename: lock mnt_renamelock as required

Fixes:  ef6ea91593ebff73e2fc201efd9f848b71c5a125
Reported by:    des

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Jul 8 2025, 7:57 PM

I can confirm the NFS server no longer crashes with this patch applied.

Looks ok to me, but I don't know much about renamelock.

This revision is now accepted and ready to land.Jul 8 2025, 8:17 PM

Peter, could you please run stress2 with the patch? I think it only makes sense to do so for nfs server part.

sys/fs/nfsserver/nfs_nfsdport.c
1655–1657

The comment needs to be updated.

kib marked an inline comment as done.

Update comment.

This revision now requires review to proceed.Jul 9 2025, 1:05 AM
markj added inline comments.
sys/fs/nfsserver/nfs_nfsdport.c
1732
This revision is now accepted and ready to land.Jul 9 2025, 3:53 PM