summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lockd: Update the NLMv1 FREE_ALL arguments decoder to use struct xdr_streamChuck Lever2021-07-061-13/+15
| | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* lockd: Update the NLMv1 SHARE arguments decoder to use struct xdr_streamChuck Lever2021-07-061-70/+26
| | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* lockd: Update the NLMv1 SM_NOTIFY arguments decoder to use struct xdr_streamChuck Lever2021-07-061-13/+26
| | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* lockd: Update the NLMv1 nlm_res arguments decoder to use struct xdr_streamChuck Lever2021-07-061-11/+14
| | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* lockd: Update the NLMv1 UNLOCK arguments decoder to use struct xdr_streamChuck Lever2021-07-061-40/+13
| | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* lockd: Update the NLMv1 CANCEL arguments decoder to use struct xdr_streamChuck Lever2021-07-061-15/+19
| | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* lockd: Update the NLMv1 LOCK arguments decoder to use struct xdr_streamChuck Lever2021-07-061-18/+23
| | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* lockd: Update the NLMv1 TEST arguments decoder to use struct xdr_streamChuck Lever2021-07-061-6/+66
| | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* lockd: Update the NLMv1 void argument decoder to use struct xdr_streamChuck Lever2021-07-061-7/+10
| | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* lockd: Common NLM XDR helpersChuck Lever2021-07-061-0/+151
| | | | | | | | Add a .h file containing xdr_stream-based XDR helpers common to both NLMv3 and NLMv4. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* lockd: Create a simplified .vs_dispatch method for NLM requestsChuck Lever2021-07-061-0/+43
| | | | | | | | To enable xdr_stream-based encoding and decoding, create a bespoke RPC dispatch function for the lockd service. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* lockd: Remove stale commentsChuck Lever2021-07-062-12/+1
| | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd: rpc_peeraddr2str needs rcu lockJ. Bruce Fields2021-07-061-0/+2
| | | | | | | | I'm not even sure cl_xprt can change here, but we're getting "suspicious RCU usage" warnings, and other rpc_peeraddr2str callers are taking the rcu lock. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* rpc: remove redundant initialization of variable statusColin Ian King2021-07-061-1/+1
| | | | | | | | | The variable status is being initialized with a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfs_common: fix doc warningChenXiaoSong2021-07-061-0/+1
| | | | | | | | | Fix gcc W=1 warning: fs/nfs_common/grace.c:91: warning: Function parameter or member 'net' not described in 'locks_in_grace' Signed-off-by: ChenXiaoSong <chenxiaosong2@huawei.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Fix error return code in nfsd4_interssc_connect()Wei Yongjun2021-07-061-0/+1
| | | | | | | | | | | 'status' has been overwritten to 0 after nfsd4_ssc_setup_dul(), this cause 0 will be return in vfs_kern_mount() error case. Fix to return nfserr_nodev in this error. Fixes: f4e44b393389 ("NFSD: delay unmount source's export after inter-server copy completed.") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd: fix kernel test robot warning in SSC codeDai Ngo2021-07-062-3/+3
| | | | | | | | | Fix by initializing pointer nfsd4_ssc_umount_item with NULL instead of 0. Replace return value of nfsd4_ssc_setup_dul with __be32 instead of int. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Dai Ngo <dai.ngo@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd4: Expose the callback address and state of each NFS4 clientDave Wysochanski2021-07-061-0/+17
| | | | | | | | In addition to the client's address, display the callback channel state and address in the 'info' file. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* xprtrdma: Fix spelling mistakesZheng Yongjun2021-07-061-3/+3
| | | | | | | | Fix some spelling mistakes in comments: succes ==> success Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd: move fsnotify on client creation outside spinlockJ. Bruce Fields2021-07-061-5/+6
| | | | | | | | | | | | | | This was causing a "sleeping function called from invalid context" warning. I don't think we need the set_and_test_bit() here; clients move from unconfirmed to confirmed only once, under the client_lock. The (conf == unconf) is a way to check whether we're in that confirming case, hopefully that's not too obscure. Fixes: 472d155a0631 "nfsd: report client confirmation status in "info" file" Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: delay unmount source's export after inter-server copy completed.Dai Ngo2021-05-256-4/+229
| | | | | | | | | | | | | | | | | | | | Currently the source's export is mounted and unmounted on every inter-server copy operation. This patch is an enhancement to delay the unmount of the source export for a certain period of time to eliminate the mount and unmount overhead on subsequent copy operations. After a copy operation completes, a work entry is added to the delayed unmount list with an expiration time. This list is serviced by the laundromat thread to unmount the export of the expired entries. Each time the export is being used again, its expiration time is extended and the entry is re-inserted to the tail of the list. The unmount task and the mount operation of the copy request are synced to make sure the export is not unmounted while it's being used. Signed-off-by: Dai Ngo <dai.ngo@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD add vfs_fsync after async copy is doneOlga Kornievskaia2021-05-252-1/+14
| | | | | | | | | | | | | | Currently, the server does all copies as NFS_UNSTABLE. For synchronous copies linux client will append a COMMIT to the COPY compound but for async copies it does not (because COMMIT needs to be done after all bytes are copied and not as a reply to the COPY operation). However, in order to save the client doing a COMMIT as a separate rpc, the server can reply back with NFS_FILE_SYNC copy. This patch proposed to add vfs_fsync() call at the end of the async copy. Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd: move some commit_metadata()s outside the inode lockJ. Bruce Fields2021-05-251-2/+3
| | | | | | | | | The commit may be time-consuming and there's no need to hold the lock for it. More of these are possible, these were just some easy ones. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* nfsd: Prevent truncation of an unlinked inode from blocking access to its ↵Yu Hsiang Huang2021-05-251-0/+5
| | | | | | | | | | | | | directory Truncation of an unlinked inode may take a long time for I/O waiting, and it doesn't have to prevent access to the directory. Thus, let truncation occur outside the directory's mutex, just like do_unlinkat() does. Signed-off-by: Yu Hsiang Huang <nickhuang@synology.com> Signed-off-by: Bing Jing Chang <bingjingc@synology.com> Signed-off-by: Robbie Ko <robbieko@synology.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Update nfsd_cb_args tracepointChuck Lever2021-05-181-3/+3
| | | | | | | | Clean-up: Re-order the display of IP address and client ID to be consistent with other _cb_ tracepoints. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Remove the nfsd_cb_work and nfsd_cb_done tracepointsChuck Lever2021-05-182-53/+0
| | | | | | | | | Clean up: These are noise in properly working systems. If you really need to observe the operation of the callback mechanism, use the sunrpc:rpc\* tracepoints along with the workqueue tracepoints. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Add an nfsd_cb_probe tracepointChuck Lever2021-05-182-0/+2
| | | | | | | | | Record a tracepoint event when the server performs a callback probe. This event can be enabled as a group with other nfsd_cb tracepoints. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Replace the nfsd_deleg_break tracepointChuck Lever2021-05-182-2/+32
| | | | | | | | | | Renamed so it can be enabled as a set with the other nfsd_cb_ tracepoints. And, consistent with those tracepoints, report the address of the client, the client ID the server has given it, and the state ID being recalled. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Add an nfsd_cb_offload tracepointChuck Lever2021-05-182-0/+38
| | | | | | | | | | | | | | Record the arguments of CB_OFFLOAD callbacks so we can better observe asynchronous copy-offload behavior. For example: nfsd-995 [008] 7721.934222: nfsd_cb_offload: addr=192.168.2.51:0 client 6092a47c:35a43fc1 fh_hash=0x8739113a count=116528 status=0 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Olga Kornievskaia <kolga@netapp.com> Cc: Dai Ngo <Dai.Ngo@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Add an nfsd_cb_lm_notify tracepointChuck Lever2021-05-182-1/+29
| | | | | | | | | | | | When the server kicks off a CB_LM_NOTIFY callback, record its arguments so we can better observe asynchronous locking behavior. For example: nfsd-998 [002] 1471.705873: nfsd_cb_notify_lock: addr=192.168.2.51:0 client 6092a47c:35a43fc1 fh_hash=0x8950b23a Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Enhance the nfsd_cb_setup tracepointChuck Lever2021-05-182-2/+28
| | | | | | | | Display the transport protocol and authentication flavor so admins can see what they might be getting wrong. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Remove spurious cb_setup_err tracepointChuck Lever2021-05-181-3/+1
| | | | | | | | This path is not really an error path, so the tracepoint I added there is just noise. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Adjust cb_shutdown tracepointChuck Lever2021-05-181-1/+3
| | | | | | | | Show when the upper layer requested a shutdown. RPC tracepoints can already show when rpc_shutdown_client() is called. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Add cb_lost tracepointChuck Lever2021-05-182-0/+3
| | | | | | | Provide more clarity about when the callback channel is in trouble. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Drop TRACE_DEFINE_ENUM for NFSD4_CB_<state> macrosChuck Lever2021-05-181-5/+0
| | | | | | | TRACE_DEFINE_ENUM() is necessary for enum {} but not for C macros. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Capture every CB state transitionChuck Lever2021-05-181-13/+15
| | | | | | | | | | | We were missing one. As a clean-up, add a helper that sets the new CB state and fires a tracepoint. The tracepoint fires only when the state changes, to help reduce trace log noise. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Constify @fh argument of knfsd_fh_hash()Chuck Lever2021-05-181-5/+2
| | | | | | | | Enable knfsd_fh_hash() to be invoked in functions where the filehandle pointer is a const. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Add tracepoints for EXCHANGEID edge casesChuck Lever2021-05-182-3/+10
| | | | | | | | Some of the most common cases are traced. Enough infrastructure is now in place that more can be added later, as needed. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Add tracepoints for SETCLIENTID edge casesChuck Lever2021-05-182-11/+45
| | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Add a couple more nfsd_clid_expired call sitesChuck Lever2021-05-182-4/+8
| | | | | | | Improve observation of NFSv4 lease expiry. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Add nfsd_clid_destroyed tracepointChuck Lever2021-05-182-0/+2
| | | | | | | Record client-requested termination of client IDs. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Add nfsd_clid_reclaim_complete tracepointChuck Lever2021-05-182-0/+2
| | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Add nfsd_clid_confirmed tracepointChuck Lever2021-05-182-5/+6
| | | | | | | | | | | | | | | | This replaces a dprintk call site in order to get greater visibility on when client IDs are confirmed or re-used. Simple example: nfsd-995 [000] 126.622975: nfsd_compound: xid=0x3a34e2b1 opcnt=1 nfsd-995 [000] 126.623005: nfsd_cb_args: addr=192.168.2.51:45901 client 60958e3b:9213ef0e prog=1073741824 ident=1 nfsd-995 [000] 126.623007: nfsd_compound_status: op=1/1 OP_SETCLIENTID status=0 nfsd-996 [001] 126.623142: nfsd_compound: xid=0x3b34e2b1 opcnt=1 >>>> nfsd-996 [001] 126.623146: nfsd_clid_confirmed: client 60958e3b:9213ef0e nfsd-996 [001] 126.623148: nfsd_cb_probe: addr=192.168.2.51:45901 client 60958e3b:9213ef0e state=UNKNOWN nfsd-996 [001] 126.623154: nfsd_compound_status: op=1/1 OP_SETCLIENTID_CONFIRM status=0 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Remove trace_nfsd_clid_inuse_errChuck Lever2021-05-181-24/+0
| | | | | | | | This tracepoint has been replaced by nfsd_clid_cred_mismatch and nfsd_clid_verf_mismatch, and can simply be removed. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Add nfsd_clid_verf_mismatch tracepointChuck Lever2021-05-182-3/+40
| | | | | | | | | | Record when a client presents a different boot verifier than the one we know about. Typically this is a sign the client has rebooted, but sometimes it signals a conflicting client ID, which the client's administrator will need to address. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Add nfsd_clid_cred_mismatch tracepointChuck Lever2021-05-182-4/+38
| | | | | | | | | Record when a client tries to establish a lease record but uses an unexpected credential. This is often a sign of a configuration problem. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Add an RPC authflavor tracepoint display helperChuck Lever2021-05-181-0/+16
| | | | | | | To be used in subsequent patches. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* NFSD: Fix TP_printk() format specifier in nfsd_clid_classChuck Lever2021-05-182-32/+0
| | | | | | | | | | | | | | Since commit 9a6944fee68e ("tracing: Add a verifier to check string pointers for trace events"), which was merged in v5.13-rc1, TP_printk() no longer tacitly supports the "%.*s" format specifier. These are low value tracepoints, so just remove them. Reported-by: David Wysochanski <dwysocha@redhat.com> Fixes: dd5e3fbc1f47 ("NFSD: Add tracepoints to the NFSD state management code") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
* Linux 5.13-rc2v5.13-rc2Linus Torvalds2021-05-161-1/+1
|
* Merge tag 'driver-core-5.13-rc2' of ↵Linus Torvalds2021-05-164-1/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are two driver fixes for driver core changes that happened in 5.13-rc1. The clk driver fix resolves a many-reported issue with booting some devices, and the USB typec fix resolves the reported problem of USB systems on some embedded boards. Both of these have been in linux-next this week with no reported issues" * tag 'driver-core-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: clk: Skip clk provider registration when np is NULL usb: typec: tcpm: Don't block probing of consumers of "connector" nodes