Page MenuHomeFreeBSD

nfs: stop using SAVESTART
ClosedPublic

Authored by mjg on Mar 7 2022, 4:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 5:39 AM
Unknown Object (File)
Dec 13 2023, 4:08 PM
Unknown Object (File)
Sep 27 2023, 7:13 PM
Unknown Object (File)
Aug 26 2023, 3:33 PM
Unknown Object (File)
Aug 26 2023, 12:11 AM
Unknown Object (File)
Aug 26 2023, 12:08 AM
Unknown Object (File)
Aug 26 2023, 12:07 AM
Unknown Object (File)
Aug 25 2023, 11:58 PM
Subscribers

Details

Summary

Only the name is wanted which is already always provided.

Diff Detail

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

Event Timeline

mjg requested review of this revision.Mar 7 2022, 4:29 PM
mjg created this revision.

It crashes almost instantly for NFSv4.
Basically, it does a vrele(ni_startdir);

Now, if you got rid of all the vrele(ni_startdir) calls (there are quite
a few of them), would it work ok?
I honestly do not know.

Here's the crash info, in case you are interested:
Fatal trap 12: page fault while in kernel mode

cpuid = 0; apic id = 00

fault virtual address = 0x1ac

fault code = supervisor write data, page not present

instruction pointer = 0x20:0xffffffff80cf0e2c

stack pointer = 0x28:0xfffffe00cd080c80

frame pointer = 0x28:0xfffffe00cd080c80

code segment = base 0x0, limit 0xfffff, type 0x1b

			= DPL 0, pres 1, long 1, def32 0, gran 1

processor eflags = interrupt enabled, resume, IOPL = 0

current process = 990 (nfsd: master)

trap number = 12

panic: page fault

cpuid = 0

time = 1646870012

KDB: stack backtrace:

db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00cd080a40

vpanic() at vpanic+0x17f/frame 0xfffffe00cd080a90

panic() at panic+0x43/frame 0xfffffe00cd080af0

trap_fatal() at trap_fatal+0x385/frame 0xfffffe00cd080b50

trap_pfault() at trap_pfault+0xab/frame 0xfffffe00cd080bb0

calltrap() at calltrap+0x8/frame 0xfffffe00cd080bb0

  • trap 0xc, rip = 0xffffffff80cf0e2c, rsp = 0xfffffe00cd080c80, rbp = 0xfffffe00cd080c80 ---

vrele() at vrele+0xc/frame 0xfffffe00cd080c80

nfsvno_open() at nfsvno_open+0x143/frame 0xfffffe00cd080d00

nfsrvd_open() at nfsrvd_open+0xe2b/frame 0xfffffe00cd0811d0

nfsrvd_dorpc() at nfsrvd_dorpc+0x1319/frame 0xfffffe00cd081400

nfssvc_program() at nfssvc_program+0x5f9/frame 0xfffffe00cd0815e0

svc_run_internal() at svc_run_internal+0xa42/frame 0xfffffe00cd081710

svc_run() at svc_run+0x230/frame 0xfffffe00cd081770

nfsrvd_nfsd() at nfsrvd_nfsd+0x338/frame 0xfffffe00cd0818d0

nfssvc_nfsd() at nfssvc_nfsd+0x4af/frame 0xfffffe00cd081de0

sys_nfssvc() at sys_nfssvc+0xae/frame 0xfffffe00cd081e00

amd64_syscall() at amd64_syscall+0x12e/frame 0xfffffe00cd081f30

fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe00cd081f30

  • syscall (155, FreeBSD ELF64, sys_nfssvc), rip = 0x2011bd332c0a, rsp = 0x7fffffffe4d8, rbp = 0x7fffffffe770 ---

KDB: enter: panic

mjg retitled this revision from nfs: replace SAVESTART with SAVENAME to nfs: stop using SAVESTART.
mjg edited the summary of this revision. (Show Details)
mjg edited the test plan for this revision. (Show Details)

Sorry about previous instance, this is a new & tested patch. Can you validate yourself just in case?

I will test this, but I probably don't have time until
around next weekend.

Looks fine to me now and tested out ok.

sys/fs/nfsserver/nfs_nfsdserv.c
1326

Very minor nit..it looks a little weird to have LOCKPARENT
in brackets, but it is up to you whether or not you leave it
that way.

This revision is now accepted and ready to land.Dec 18 2022, 9:33 PM
This revision was automatically updated to reflect the committed changes.