NFSD: add cb opcode to WARN_ONCE on failed callback
Subsystems (2)
Olga Kornievskaia
reviewerPATCH 1/1 NFSD: add cb opcode to WARN_ONCE on failed callback
It helps to know what kind of callback happened that triggered the WARN_ONCE in nfsd4_cb_done() function in diagnosing what can set an uncommon state where both cb_status and tk_status are set at the same time.
--- fs/nfsd/nfs4callback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
fs/nfsd/nfs4callback.c +3 -2
@@ -1397,8 +1397,9 @@ static void nfsd4_cb_done(struct rpc_task *task, void *calldata)return ;if (cb->cb_status) { -WARN_ONCE (task->tk_status,"cb_status=%d tk_status=%d" , - cb->cb_status, task->tk_status); +WARN_ONCE (task->tk_status, +"cb_status=%d tk_status=%d cb_opcode=%d" , + cb->cb_status, task->tk_status, cb->cb_ops->opcode); task->tk_status = cb->cb_status; }
Signature · 1 line
2.43.5
Quoted 17 lines · Olga Kornievskaia
It helps to know what kind of callback happened that triggered the
WARN_ONCEinnfsd4_cb_done()function in diagnosing what can set an uncommon state where bothcb_statusandtk_statusare set at the same time.Fixes e8581a912447 ("nfsd: add more info to WARN_ON_ONCE on failed callbacks")Signed-off-by Olga Kornievskaia <[email protected]>--- fs/nfsd/nfs4callback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)fs/nfsd/nfs4callback.c +0
-0@@ -1397,8 +1397,9 @@ static void nfsd4_cb_done(struct rpc_task *task, void *calldata)return ;
fs/nfsd/nfs4callback.c static void nfsd4_cb_done(struct rpc_task *task, void *calldata) · line 1405
Quoted 10 lines
fs/nfsd/nfs4callback.c +3
-2if (cb->cb_status) { -WARN_ONCE (task->tk_status,"cb_status=%d tk_status=%d" , - cb->cb_status, task->tk_status); +WARN_ONCE (task->tk_status, +"cb_status=%d tk_status=%d cb_opcode=%d" , + cb->cb_status, task->tk_status, cb->cb_ops->opcode); task->tk_status = cb->cb_status; }
[email protected]
maintainerFrom: Chuck Lever <[email protected]>
Quoted 6 lines · Olga Kornievskaia
It helps to know what kind of callback happened that triggered the
WARN_ONCEinnfsd4_cb_done()function in diagnosing what can set an uncommon state where bothcb_statusandtk_statusare set at the same time.
Applied to nfsd-testing for v6.14, thanks!
[1/1] NFSD: add cb opcode to WARN_ONCE on failed callback
commit: a3f44affa23bf2aeccb1eb82492d38f3ad2cade3
--
Chuck Lever