1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2013 Trond Myklebust <Trond.Myklebust@netapp.com>
6 #define TRACE_SYSTEM nfs4
8 #if !defined(_TRACE_NFS4_H) || defined(TRACE_HEADER_MULTI_READ)
11 #include <linux/tracepoint.h>
12 #include <trace/misc/sunrpc.h>
14 #include <trace/misc/fs.h>
15 #include <trace/misc/nfs.h>
17 #define show_nfs_fattr_flags(valid) \
18 __print_flags((unsigned long)valid, "|", \
19 { NFS_ATTR_FATTR_TYPE, "TYPE" }, \
20 { NFS_ATTR_FATTR_MODE, "MODE" }, \
21 { NFS_ATTR_FATTR_NLINK, "NLINK" }, \
22 { NFS_ATTR_FATTR_OWNER, "OWNER" }, \
23 { NFS_ATTR_FATTR_GROUP, "GROUP" }, \
24 { NFS_ATTR_FATTR_RDEV, "RDEV" }, \
25 { NFS_ATTR_FATTR_SIZE, "SIZE" }, \
26 { NFS_ATTR_FATTR_FSID, "FSID" }, \
27 { NFS_ATTR_FATTR_FILEID, "FILEID" }, \
28 { NFS_ATTR_FATTR_ATIME, "ATIME" }, \
29 { NFS_ATTR_FATTR_MTIME, "MTIME" }, \
30 { NFS_ATTR_FATTR_CTIME, "CTIME" }, \
31 { NFS_ATTR_FATTR_CHANGE, "CHANGE" }, \
32 { NFS_ATTR_FATTR_OWNER_NAME, "OWNER_NAME" }, \
33 { NFS_ATTR_FATTR_GROUP_NAME, "GROUP_NAME" })
35 DECLARE_EVENT_CLASS(nfs4_clientid_event
,
37 const struct nfs_client
*clp
,
44 __string(dstaddr
, clp
->cl_hostname
)
45 __field(unsigned long, error
)
49 __entry
->error
= error
< 0 ? -error
: 0;
50 __assign_str(dstaddr
);
54 "error=%ld (%s) dstaddr=%s",
56 show_nfs4_status(__entry
->error
),
60 #define DEFINE_NFS4_CLIENTID_EVENT(name) \
61 DEFINE_EVENT(nfs4_clientid_event, name, \
63 const struct nfs_client *clp, \
67 DEFINE_NFS4_CLIENTID_EVENT(nfs4_setclientid
);
68 DEFINE_NFS4_CLIENTID_EVENT(nfs4_setclientid_confirm
);
69 DEFINE_NFS4_CLIENTID_EVENT(nfs4_renew
);
70 DEFINE_NFS4_CLIENTID_EVENT(nfs4_renew_async
);
71 #ifdef CONFIG_NFS_V4_1
72 DEFINE_NFS4_CLIENTID_EVENT(nfs4_exchange_id
);
73 DEFINE_NFS4_CLIENTID_EVENT(nfs4_create_session
);
74 DEFINE_NFS4_CLIENTID_EVENT(nfs4_destroy_session
);
75 DEFINE_NFS4_CLIENTID_EVENT(nfs4_destroy_clientid
);
76 DEFINE_NFS4_CLIENTID_EVENT(nfs4_bind_conn_to_session
);
77 DEFINE_NFS4_CLIENTID_EVENT(nfs4_sequence
);
78 DEFINE_NFS4_CLIENTID_EVENT(nfs4_reclaim_complete
);
80 TRACE_EVENT(nfs4_trunked_exchange_id
,
82 const struct nfs_client
*clp
,
87 TP_ARGS(clp
, addr
, error
),
90 __string(main_addr
, clp
->cl_hostname
)
91 __string(trunk_addr
, addr
)
92 __field(unsigned long, error
)
96 __entry
->error
= error
< 0 ? -error
: 0;
97 __assign_str(main_addr
);
98 __assign_str(trunk_addr
);
102 "error=%ld (%s) main_addr=%s trunk_addr=%s",
104 show_nfs4_status(__entry
->error
),
105 __get_str(main_addr
),
106 __get_str(trunk_addr
)
110 TRACE_EVENT(nfs4_sequence_done
,
112 const struct nfs4_session
*session
,
113 const struct nfs4_sequence_res
*res
115 TP_ARGS(session
, res
),
118 __field(unsigned int, session
)
119 __field(unsigned int, slot_nr
)
120 __field(unsigned int, seq_nr
)
121 __field(unsigned int, highest_slotid
)
122 __field(unsigned int, target_highest_slotid
)
123 __field(unsigned long, status_flags
)
124 __field(unsigned long, error
)
128 const struct nfs4_slot
*sr_slot
= res
->sr_slot
;
129 __entry
->session
= nfs_session_id_hash(&session
->sess_id
);
130 __entry
->slot_nr
= sr_slot
->slot_nr
;
131 __entry
->seq_nr
= sr_slot
->seq_nr
;
132 __entry
->highest_slotid
= res
->sr_highest_slotid
;
133 __entry
->target_highest_slotid
=
134 res
->sr_target_highest_slotid
;
135 __entry
->status_flags
= res
->sr_status_flags
;
136 __entry
->error
= res
->sr_status
< 0 ?
140 "error=%ld (%s) session=0x%08x slot_nr=%u seq_nr=%u "
141 "highest_slotid=%u target_highest_slotid=%u "
142 "status_flags=0x%lx (%s)",
144 show_nfs4_status(__entry
->error
),
148 __entry
->highest_slotid
,
149 __entry
->target_highest_slotid
,
150 __entry
->status_flags
,
151 show_nfs4_seq4_status(__entry
->status_flags
)
155 struct cb_sequenceargs
;
156 struct cb_sequenceres
;
158 TRACE_EVENT(nfs4_cb_sequence
,
160 const struct cb_sequenceargs
*args
,
161 const struct cb_sequenceres
*res
,
164 TP_ARGS(args
, res
, status
),
167 __field(unsigned int, session
)
168 __field(unsigned int, slot_nr
)
169 __field(unsigned int, seq_nr
)
170 __field(unsigned int, highest_slotid
)
171 __field(unsigned int, cachethis
)
172 __field(unsigned long, error
)
176 __entry
->session
= nfs_session_id_hash(&args
->csa_sessionid
);
177 __entry
->slot_nr
= args
->csa_slotid
;
178 __entry
->seq_nr
= args
->csa_sequenceid
;
179 __entry
->highest_slotid
= args
->csa_highestslotid
;
180 __entry
->cachethis
= args
->csa_cachethis
;
181 __entry
->error
= be32_to_cpu(status
);
185 "error=%ld (%s) session=0x%08x slot_nr=%u seq_nr=%u "
188 show_nfs4_status(__entry
->error
),
192 __entry
->highest_slotid
196 TRACE_EVENT(nfs4_cb_seqid_err
,
198 const struct cb_sequenceargs
*args
,
201 TP_ARGS(args
, status
),
204 __field(unsigned int, session
)
205 __field(unsigned int, slot_nr
)
206 __field(unsigned int, seq_nr
)
207 __field(unsigned int, highest_slotid
)
208 __field(unsigned int, cachethis
)
209 __field(unsigned long, error
)
213 __entry
->session
= nfs_session_id_hash(&args
->csa_sessionid
);
214 __entry
->slot_nr
= args
->csa_slotid
;
215 __entry
->seq_nr
= args
->csa_sequenceid
;
216 __entry
->highest_slotid
= args
->csa_highestslotid
;
217 __entry
->cachethis
= args
->csa_cachethis
;
218 __entry
->error
= be32_to_cpu(status
);
222 "error=%ld (%s) session=0x%08x slot_nr=%u seq_nr=%u "
225 show_nfs4_status(__entry
->error
),
229 __entry
->highest_slotid
233 TRACE_EVENT(nfs4_cb_offload
,
235 const struct nfs_fh
*cb_fh
,
236 const nfs4_stateid
*cb_stateid
,
242 TP_ARGS(cb_fh
, cb_stateid
, cb_count
, cb_error
,
246 __field(unsigned long, error
)
247 __field(u32
, fhandle
)
248 __field(loff_t
, cb_count
)
250 __field(int, cb_stateid_seq
)
251 __field(u32
, cb_stateid_hash
)
255 __entry
->error
= cb_error
< 0 ? -cb_error
: 0;
256 __entry
->fhandle
= nfs_fhandle_hash(cb_fh
);
257 __entry
->cb_stateid_seq
=
258 be32_to_cpu(cb_stateid
->seqid
);
259 __entry
->cb_stateid_hash
=
260 nfs_stateid_hash(cb_stateid
);
261 __entry
->cb_count
= cb_count
;
262 __entry
->cb_how
= cb_how_stable
;
266 "error=%ld (%s) fhandle=0x%08x cb_stateid=%d:0x%08x "
267 "cb_count=%llu cb_how=%s",
269 show_nfs4_status(__entry
->error
),
271 __entry
->cb_stateid_seq
, __entry
->cb_stateid_hash
,
273 show_nfs_stable_how(__entry
->cb_how
)
276 #endif /* CONFIG_NFS_V4_1 */
278 TRACE_EVENT(nfs4_setup_sequence
,
280 const struct nfs4_session
*session
,
281 const struct nfs4_sequence_args
*args
283 TP_ARGS(session
, args
),
286 __field(unsigned int, session
)
287 __field(unsigned int, slot_nr
)
288 __field(unsigned int, seq_nr
)
289 __field(unsigned int, highest_used_slotid
)
293 const struct nfs4_slot
*sa_slot
= args
->sa_slot
;
294 __entry
->session
= session
? nfs_session_id_hash(&session
->sess_id
) : 0;
295 __entry
->slot_nr
= sa_slot
->slot_nr
;
296 __entry
->seq_nr
= sa_slot
->seq_nr
;
297 __entry
->highest_used_slotid
=
298 sa_slot
->table
->highest_used_slotid
;
301 "session=0x%08x slot_nr=%u seq_nr=%u "
302 "highest_used_slotid=%u",
306 __entry
->highest_used_slotid
310 TRACE_DEFINE_ENUM(NFS4CLNT_MANAGER_RUNNING
);
311 TRACE_DEFINE_ENUM(NFS4CLNT_CHECK_LEASE
);
312 TRACE_DEFINE_ENUM(NFS4CLNT_LEASE_EXPIRED
);
313 TRACE_DEFINE_ENUM(NFS4CLNT_RECLAIM_REBOOT
);
314 TRACE_DEFINE_ENUM(NFS4CLNT_RECLAIM_NOGRACE
);
315 TRACE_DEFINE_ENUM(NFS4CLNT_DELEGRETURN
);
316 TRACE_DEFINE_ENUM(NFS4CLNT_SESSION_RESET
);
317 TRACE_DEFINE_ENUM(NFS4CLNT_LEASE_CONFIRM
);
318 TRACE_DEFINE_ENUM(NFS4CLNT_SERVER_SCOPE_MISMATCH
);
319 TRACE_DEFINE_ENUM(NFS4CLNT_PURGE_STATE
);
320 TRACE_DEFINE_ENUM(NFS4CLNT_BIND_CONN_TO_SESSION
);
321 TRACE_DEFINE_ENUM(NFS4CLNT_MOVED
);
322 TRACE_DEFINE_ENUM(NFS4CLNT_LEASE_MOVED
);
323 TRACE_DEFINE_ENUM(NFS4CLNT_DELEGATION_EXPIRED
);
324 TRACE_DEFINE_ENUM(NFS4CLNT_RUN_MANAGER
);
325 TRACE_DEFINE_ENUM(NFS4CLNT_MANAGER_AVAILABLE
);
326 TRACE_DEFINE_ENUM(NFS4CLNT_RECALL_RUNNING
);
327 TRACE_DEFINE_ENUM(NFS4CLNT_RECALL_ANY_LAYOUT_READ
);
328 TRACE_DEFINE_ENUM(NFS4CLNT_RECALL_ANY_LAYOUT_RW
);
329 TRACE_DEFINE_ENUM(NFS4CLNT_DELEGRETURN_DELAYED
);
331 #define show_nfs4_clp_state(state) \
332 __print_flags(state, "|", \
333 { BIT(NFS4CLNT_MANAGER_RUNNING), "MANAGER_RUNNING" }, \
334 { BIT(NFS4CLNT_CHECK_LEASE), "CHECK_LEASE" }, \
335 { BIT(NFS4CLNT_LEASE_EXPIRED), "LEASE_EXPIRED" }, \
336 { BIT(NFS4CLNT_RECLAIM_REBOOT), "RECLAIM_REBOOT" }, \
337 { BIT(NFS4CLNT_RECLAIM_NOGRACE), "RECLAIM_NOGRACE" }, \
338 { BIT(NFS4CLNT_DELEGRETURN), "DELEGRETURN" }, \
339 { BIT(NFS4CLNT_SESSION_RESET), "SESSION_RESET" }, \
340 { BIT(NFS4CLNT_LEASE_CONFIRM), "LEASE_CONFIRM" }, \
341 { BIT(NFS4CLNT_SERVER_SCOPE_MISMATCH), "SERVER_SCOPE_MISMATCH" }, \
342 { BIT(NFS4CLNT_PURGE_STATE), "PURGE_STATE" }, \
343 { BIT(NFS4CLNT_BIND_CONN_TO_SESSION), "BIND_CONN_TO_SESSION" }, \
344 { BIT(NFS4CLNT_MOVED), "MOVED" }, \
345 { BIT(NFS4CLNT_LEASE_MOVED), "LEASE_MOVED" }, \
346 { BIT(NFS4CLNT_DELEGATION_EXPIRED), "DELEGATION_EXPIRED" }, \
347 { BIT(NFS4CLNT_RUN_MANAGER), "RUN_MANAGER" }, \
348 { BIT(NFS4CLNT_MANAGER_AVAILABLE), "MANAGER_AVAILABLE" }, \
349 { BIT(NFS4CLNT_RECALL_RUNNING), "RECALL_RUNNING" }, \
350 { BIT(NFS4CLNT_RECALL_ANY_LAYOUT_READ), "RECALL_ANY_LAYOUT_READ" }, \
351 { BIT(NFS4CLNT_RECALL_ANY_LAYOUT_RW), "RECALL_ANY_LAYOUT_RW" }, \
352 { BIT(NFS4CLNT_DELEGRETURN_DELAYED), "DELERETURN_DELAYED" })
354 TRACE_EVENT(nfs4_state_mgr
,
356 const struct nfs_client
*clp
362 __field(unsigned long, state
)
363 __string(hostname
, clp
->cl_hostname
)
367 __entry
->state
= clp
->cl_state
;
368 __assign_str(hostname
);
372 "hostname=%s clp state=%s", __get_str(hostname
),
373 show_nfs4_clp_state(__entry
->state
)
377 TRACE_EVENT(nfs4_state_mgr_failed
,
379 const struct nfs_client
*clp
,
384 TP_ARGS(clp
, section
, status
),
387 __field(unsigned long, error
)
388 __field(unsigned long, state
)
389 __string(hostname
, clp
->cl_hostname
)
390 __string(section
, section
)
394 __entry
->error
= status
< 0 ? -status
: 0;
395 __entry
->state
= clp
->cl_state
;
396 __assign_str(hostname
);
397 __assign_str(section
);
401 "hostname=%s clp state=%s error=%ld (%s) section=%s",
403 show_nfs4_clp_state(__entry
->state
), -__entry
->error
,
404 show_nfs4_status(__entry
->error
), __get_str(section
)
409 TRACE_EVENT(nfs4_xdr_bad_operation
,
411 const struct xdr_stream
*xdr
,
416 TP_ARGS(xdr
, op
, expected
),
419 __field(unsigned int, task_id
)
420 __field(unsigned int, client_id
)
423 __field(u32
, expected
)
427 const struct rpc_rqst
*rqstp
= xdr
->rqst
;
428 const struct rpc_task
*task
= rqstp
->rq_task
;
430 __entry
->task_id
= task
->tk_pid
;
431 __entry
->client_id
= task
->tk_client
->cl_clid
;
432 __entry
->xid
= be32_to_cpu(rqstp
->rq_xid
);
434 __entry
->expected
= expected
;
437 TP_printk(SUNRPC_TRACE_TASK_SPECIFIER
438 " xid=0x%08x operation=%u, expected=%u",
439 __entry
->task_id
, __entry
->client_id
, __entry
->xid
,
440 __entry
->op
, __entry
->expected
444 DECLARE_EVENT_CLASS(nfs4_xdr_event
,
446 const struct xdr_stream
*xdr
,
451 TP_ARGS(xdr
, op
, error
),
454 __field(unsigned int, task_id
)
455 __field(unsigned int, client_id
)
458 __field(unsigned long, error
)
462 const struct rpc_rqst
*rqstp
= xdr
->rqst
;
463 const struct rpc_task
*task
= rqstp
->rq_task
;
465 __entry
->task_id
= task
->tk_pid
;
466 __entry
->client_id
= task
->tk_client
->cl_clid
;
467 __entry
->xid
= be32_to_cpu(rqstp
->rq_xid
);
469 __entry
->error
= error
;
472 TP_printk(SUNRPC_TRACE_TASK_SPECIFIER
473 " xid=0x%08x error=%ld (%s) operation=%u",
474 __entry
->task_id
, __entry
->client_id
, __entry
->xid
,
475 -__entry
->error
, show_nfs4_status(__entry
->error
),
479 #define DEFINE_NFS4_XDR_EVENT(name) \
480 DEFINE_EVENT(nfs4_xdr_event, name, \
482 const struct xdr_stream *xdr, \
486 TP_ARGS(xdr, op, error))
487 DEFINE_NFS4_XDR_EVENT(nfs4_xdr_status
);
488 DEFINE_NFS4_XDR_EVENT(nfs4_xdr_bad_filehandle
);
490 DECLARE_EVENT_CLASS(nfs4_cb_error_class
,
496 TP_ARGS(xid
, cb_ident
),
500 __field(u32
, cbident
)
504 __entry
->xid
= be32_to_cpu(xid
);
505 __entry
->cbident
= cb_ident
;
509 "xid=0x%08x cb_ident=0x%08x",
510 __entry
->xid
, __entry
->cbident
514 #define DEFINE_CB_ERROR_EVENT(name) \
515 DEFINE_EVENT(nfs4_cb_error_class, nfs_cb_##name, \
520 TP_ARGS(xid, cb_ident))
522 DEFINE_CB_ERROR_EVENT(no_clp
);
523 DEFINE_CB_ERROR_EVENT(badprinc
);
525 DECLARE_EVENT_CLASS(nfs4_open_event
,
527 const struct nfs_open_context
*ctx
,
532 TP_ARGS(ctx
, flags
, error
),
535 __field(unsigned long, error
)
536 __field(unsigned long, flags
)
537 __field(unsigned long, fmode
)
539 __field(u32
, fhandle
)
542 __string(name
, ctx
->dentry
->d_name
.name
)
543 __field(int, stateid_seq
)
544 __field(u32
, stateid_hash
)
545 __field(int, openstateid_seq
)
546 __field(u32
, openstateid_hash
)
550 const struct nfs4_state
*state
= ctx
->state
;
551 const struct inode
*inode
= NULL
;
553 __entry
->error
= -error
;
554 __entry
->flags
= flags
;
555 __entry
->fmode
= (__force
unsigned long)ctx
->mode
;
556 __entry
->dev
= ctx
->dentry
->d_sb
->s_dev
;
557 if (!IS_ERR_OR_NULL(state
)) {
558 inode
= state
->inode
;
559 __entry
->stateid_seq
=
560 be32_to_cpu(state
->stateid
.seqid
);
561 __entry
->stateid_hash
=
562 nfs_stateid_hash(&state
->stateid
);
563 __entry
->openstateid_seq
=
564 be32_to_cpu(state
->open_stateid
.seqid
);
565 __entry
->openstateid_hash
=
566 nfs_stateid_hash(&state
->open_stateid
);
568 __entry
->stateid_seq
= 0;
569 __entry
->stateid_hash
= 0;
570 __entry
->openstateid_seq
= 0;
571 __entry
->openstateid_hash
= 0;
574 __entry
->fileid
= NFS_FILEID(inode
);
575 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
578 __entry
->fhandle
= 0;
580 __entry
->dir
= NFS_FILEID(d_inode(ctx
->dentry
->d_parent
));
585 "error=%ld (%s) flags=%lu (%s) fmode=%s "
586 "fileid=%02x:%02x:%llu fhandle=0x%08x "
587 "name=%02x:%02x:%llu/%s stateid=%d:0x%08x "
588 "openstateid=%d:0x%08x",
590 show_nfs4_status(__entry
->error
),
592 show_fs_fcntl_open_flags(__entry
->flags
),
593 show_fs_fmode_flags(__entry
->fmode
),
594 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
595 (unsigned long long)__entry
->fileid
,
597 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
598 (unsigned long long)__entry
->dir
,
600 __entry
->stateid_seq
, __entry
->stateid_hash
,
601 __entry
->openstateid_seq
, __entry
->openstateid_hash
605 #define DEFINE_NFS4_OPEN_EVENT(name) \
606 DEFINE_EVENT(nfs4_open_event, name, \
608 const struct nfs_open_context *ctx, \
612 TP_ARGS(ctx, flags, error))
613 DEFINE_NFS4_OPEN_EVENT(nfs4_open_reclaim
);
614 DEFINE_NFS4_OPEN_EVENT(nfs4_open_expired
);
615 DEFINE_NFS4_OPEN_EVENT(nfs4_open_file
);
617 TRACE_EVENT(nfs4_cached_open
,
619 const struct nfs4_state
*state
624 __field(u32
, fhandle
)
626 __field(unsigned int, fmode
)
627 __field(int, stateid_seq
)
628 __field(u32
, stateid_hash
)
632 const struct inode
*inode
= state
->inode
;
634 __entry
->dev
= inode
->i_sb
->s_dev
;
635 __entry
->fileid
= NFS_FILEID(inode
);
636 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
637 __entry
->fmode
= (__force
unsigned int)state
->state
;
638 __entry
->stateid_seq
=
639 be32_to_cpu(state
->stateid
.seqid
);
640 __entry
->stateid_hash
=
641 nfs_stateid_hash(&state
->stateid
);
645 "fmode=%s fileid=%02x:%02x:%llu "
646 "fhandle=0x%08x stateid=%d:0x%08x",
647 __entry
->fmode
? show_fs_fmode_flags(__entry
->fmode
) :
649 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
650 (unsigned long long)__entry
->fileid
,
652 __entry
->stateid_seq
, __entry
->stateid_hash
656 TRACE_EVENT(nfs4_close
,
658 const struct nfs4_state
*state
,
659 const struct nfs_closeargs
*args
,
660 const struct nfs_closeres
*res
,
664 TP_ARGS(state
, args
, res
, error
),
668 __field(u32
, fhandle
)
670 __field(unsigned int, fmode
)
671 __field(unsigned long, error
)
672 __field(int, stateid_seq
)
673 __field(u32
, stateid_hash
)
677 const struct inode
*inode
= state
->inode
;
679 __entry
->dev
= inode
->i_sb
->s_dev
;
680 __entry
->fileid
= NFS_FILEID(inode
);
681 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
682 __entry
->fmode
= (__force
unsigned int)state
->state
;
683 __entry
->error
= error
< 0 ? -error
: 0;
684 __entry
->stateid_seq
=
685 be32_to_cpu(args
->stateid
.seqid
);
686 __entry
->stateid_hash
=
687 nfs_stateid_hash(&args
->stateid
);
691 "error=%ld (%s) fmode=%s fileid=%02x:%02x:%llu "
692 "fhandle=0x%08x openstateid=%d:0x%08x",
694 show_nfs4_status(__entry
->error
),
695 __entry
->fmode
? show_fs_fmode_flags(__entry
->fmode
) :
697 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
698 (unsigned long long)__entry
->fileid
,
700 __entry
->stateid_seq
, __entry
->stateid_hash
704 DECLARE_EVENT_CLASS(nfs4_lock_event
,
706 const struct file_lock
*request
,
707 const struct nfs4_state
*state
,
712 TP_ARGS(request
, state
, cmd
, error
),
715 __field(unsigned long, error
)
716 __field(unsigned long, cmd
)
717 __field(unsigned long, type
)
718 __field(loff_t
, start
)
721 __field(u32
, fhandle
)
723 __field(int, stateid_seq
)
724 __field(u32
, stateid_hash
)
728 const struct inode
*inode
= state
->inode
;
730 __entry
->error
= error
< 0 ? -error
: 0;
732 __entry
->type
= request
->c
.flc_type
;
733 __entry
->start
= request
->fl_start
;
734 __entry
->end
= request
->fl_end
;
735 __entry
->dev
= inode
->i_sb
->s_dev
;
736 __entry
->fileid
= NFS_FILEID(inode
);
737 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
738 __entry
->stateid_seq
=
739 be32_to_cpu(state
->stateid
.seqid
);
740 __entry
->stateid_hash
=
741 nfs_stateid_hash(&state
->stateid
);
745 "error=%ld (%s) cmd=%s:%s range=%lld:%lld "
746 "fileid=%02x:%02x:%llu fhandle=0x%08x "
749 show_nfs4_status(__entry
->error
),
750 show_fs_fcntl_cmd(__entry
->cmd
),
751 show_fs_fcntl_lock_type(__entry
->type
),
752 (long long)__entry
->start
,
753 (long long)__entry
->end
,
754 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
755 (unsigned long long)__entry
->fileid
,
757 __entry
->stateid_seq
, __entry
->stateid_hash
761 #define DEFINE_NFS4_LOCK_EVENT(name) \
762 DEFINE_EVENT(nfs4_lock_event, name, \
764 const struct file_lock *request, \
765 const struct nfs4_state *state, \
769 TP_ARGS(request, state, cmd, error))
770 DEFINE_NFS4_LOCK_EVENT(nfs4_get_lock
);
771 DEFINE_NFS4_LOCK_EVENT(nfs4_unlock
);
773 TRACE_EVENT(nfs4_set_lock
,
775 const struct file_lock
*request
,
776 const struct nfs4_state
*state
,
777 const nfs4_stateid
*lockstateid
,
782 TP_ARGS(request
, state
, lockstateid
, cmd
, error
),
785 __field(unsigned long, error
)
786 __field(unsigned long, cmd
)
787 __field(unsigned long, type
)
788 __field(loff_t
, start
)
791 __field(u32
, fhandle
)
793 __field(int, stateid_seq
)
794 __field(u32
, stateid_hash
)
795 __field(int, lockstateid_seq
)
796 __field(u32
, lockstateid_hash
)
800 const struct inode
*inode
= state
->inode
;
802 __entry
->error
= error
< 0 ? -error
: 0;
804 __entry
->type
= request
->c
.flc_type
;
805 __entry
->start
= request
->fl_start
;
806 __entry
->end
= request
->fl_end
;
807 __entry
->dev
= inode
->i_sb
->s_dev
;
808 __entry
->fileid
= NFS_FILEID(inode
);
809 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
810 __entry
->stateid_seq
=
811 be32_to_cpu(state
->stateid
.seqid
);
812 __entry
->stateid_hash
=
813 nfs_stateid_hash(&state
->stateid
);
814 __entry
->lockstateid_seq
=
815 be32_to_cpu(lockstateid
->seqid
);
816 __entry
->lockstateid_hash
=
817 nfs_stateid_hash(lockstateid
);
821 "error=%ld (%s) cmd=%s:%s range=%lld:%lld "
822 "fileid=%02x:%02x:%llu fhandle=0x%08x "
823 "stateid=%d:0x%08x lockstateid=%d:0x%08x",
825 show_nfs4_status(__entry
->error
),
826 show_fs_fcntl_cmd(__entry
->cmd
),
827 show_fs_fcntl_lock_type(__entry
->type
),
828 (long long)__entry
->start
,
829 (long long)__entry
->end
,
830 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
831 (unsigned long long)__entry
->fileid
,
833 __entry
->stateid_seq
, __entry
->stateid_hash
,
834 __entry
->lockstateid_seq
, __entry
->lockstateid_hash
838 TRACE_DEFINE_ENUM(LK_STATE_IN_USE
);
839 TRACE_DEFINE_ENUM(NFS_DELEGATED_STATE
);
840 TRACE_DEFINE_ENUM(NFS_OPEN_STATE
);
841 TRACE_DEFINE_ENUM(NFS_O_RDONLY_STATE
);
842 TRACE_DEFINE_ENUM(NFS_O_WRONLY_STATE
);
843 TRACE_DEFINE_ENUM(NFS_O_RDWR_STATE
);
844 TRACE_DEFINE_ENUM(NFS_STATE_RECLAIM_REBOOT
);
845 TRACE_DEFINE_ENUM(NFS_STATE_RECLAIM_NOGRACE
);
846 TRACE_DEFINE_ENUM(NFS_STATE_POSIX_LOCKS
);
847 TRACE_DEFINE_ENUM(NFS_STATE_RECOVERY_FAILED
);
848 TRACE_DEFINE_ENUM(NFS_STATE_MAY_NOTIFY_LOCK
);
849 TRACE_DEFINE_ENUM(NFS_STATE_CHANGE_WAIT
);
850 TRACE_DEFINE_ENUM(NFS_CLNT_DST_SSC_COPY_STATE
);
851 TRACE_DEFINE_ENUM(NFS_CLNT_SRC_SSC_COPY_STATE
);
852 TRACE_DEFINE_ENUM(NFS_SRV_SSC_COPY_STATE
);
854 #define show_nfs4_state_flags(flags) \
855 __print_flags(flags, "|", \
856 { LK_STATE_IN_USE, "IN_USE" }, \
857 { NFS_DELEGATED_STATE, "DELEGATED" }, \
858 { NFS_OPEN_STATE, "OPEN" }, \
859 { NFS_O_RDONLY_STATE, "O_RDONLY" }, \
860 { NFS_O_WRONLY_STATE, "O_WRONLY" }, \
861 { NFS_O_RDWR_STATE, "O_RDWR" }, \
862 { NFS_STATE_RECLAIM_REBOOT, "RECLAIM_REBOOT" }, \
863 { NFS_STATE_RECLAIM_NOGRACE, "RECLAIM_NOGRACE" }, \
864 { NFS_STATE_POSIX_LOCKS, "POSIX_LOCKS" }, \
865 { NFS_STATE_RECOVERY_FAILED, "RECOVERY_FAILED" }, \
866 { NFS_STATE_MAY_NOTIFY_LOCK, "MAY_NOTIFY_LOCK" }, \
867 { NFS_STATE_CHANGE_WAIT, "CHANGE_WAIT" }, \
868 { NFS_CLNT_DST_SSC_COPY_STATE, "CLNT_DST_SSC_COPY" }, \
869 { NFS_CLNT_SRC_SSC_COPY_STATE, "CLNT_SRC_SSC_COPY" }, \
870 { NFS_SRV_SSC_COPY_STATE, "SRV_SSC_COPY" })
872 #define show_nfs4_lock_flags(flags) \
873 __print_flags(flags, "|", \
874 { BIT(NFS_LOCK_INITIALIZED), "INITIALIZED" }, \
875 { BIT(NFS_LOCK_LOST), "LOST" })
877 TRACE_EVENT(nfs4_state_lock_reclaim
,
879 const struct nfs4_state
*state
,
880 const struct nfs4_lock_state
*lock
883 TP_ARGS(state
, lock
),
887 __field(u32
, fhandle
)
889 __field(unsigned long, state_flags
)
890 __field(unsigned long, lock_flags
)
891 __field(int, stateid_seq
)
892 __field(u32
, stateid_hash
)
896 const struct inode
*inode
= state
->inode
;
898 __entry
->dev
= inode
->i_sb
->s_dev
;
899 __entry
->fileid
= NFS_FILEID(inode
);
900 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
901 __entry
->state_flags
= state
->flags
;
902 __entry
->lock_flags
= lock
->ls_flags
;
903 __entry
->stateid_seq
=
904 be32_to_cpu(state
->stateid
.seqid
);
905 __entry
->stateid_hash
=
906 nfs_stateid_hash(&state
->stateid
);
910 "fileid=%02x:%02x:%llu fhandle=0x%08x "
911 "stateid=%d:0x%08x state_flags=%s lock_flags=%s",
912 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
913 (unsigned long long)__entry
->fileid
, __entry
->fhandle
,
914 __entry
->stateid_seq
, __entry
->stateid_hash
,
915 show_nfs4_state_flags(__entry
->state_flags
),
916 show_nfs4_lock_flags(__entry
->lock_flags
)
920 DECLARE_EVENT_CLASS(nfs4_set_delegation_event
,
922 const struct inode
*inode
,
926 TP_ARGS(inode
, fmode
),
930 __field(u32
, fhandle
)
932 __field(unsigned int, fmode
)
936 __entry
->dev
= inode
->i_sb
->s_dev
;
937 __entry
->fileid
= NFS_FILEID(inode
);
938 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
939 __entry
->fmode
= (__force
unsigned int)fmode
;
943 "fmode=%s fileid=%02x:%02x:%llu fhandle=0x%08x",
944 show_fs_fmode_flags(__entry
->fmode
),
945 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
946 (unsigned long long)__entry
->fileid
,
950 #define DEFINE_NFS4_SET_DELEGATION_EVENT(name) \
951 DEFINE_EVENT(nfs4_set_delegation_event, name, \
953 const struct inode *inode, \
956 TP_ARGS(inode, fmode))
957 DEFINE_NFS4_SET_DELEGATION_EVENT(nfs4_set_delegation
);
958 DEFINE_NFS4_SET_DELEGATION_EVENT(nfs4_reclaim_delegation
);
960 TRACE_EVENT(nfs4_delegreturn_exit
,
962 const struct nfs4_delegreturnargs
*args
,
963 const struct nfs4_delegreturnres
*res
,
967 TP_ARGS(args
, res
, error
),
971 __field(u32
, fhandle
)
972 __field(unsigned long, error
)
973 __field(int, stateid_seq
)
974 __field(u32
, stateid_hash
)
978 __entry
->dev
= res
->server
->s_dev
;
979 __entry
->fhandle
= nfs_fhandle_hash(args
->fhandle
);
980 __entry
->error
= error
< 0 ? -error
: 0;
981 __entry
->stateid_seq
=
982 be32_to_cpu(args
->stateid
->seqid
);
983 __entry
->stateid_hash
=
984 nfs_stateid_hash(args
->stateid
);
988 "error=%ld (%s) dev=%02x:%02x fhandle=0x%08x "
991 show_nfs4_status(__entry
->error
),
992 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
994 __entry
->stateid_seq
, __entry
->stateid_hash
998 #ifdef CONFIG_NFS_V4_1
999 DECLARE_EVENT_CLASS(nfs4_test_stateid_event
,
1001 const struct nfs4_state
*state
,
1002 const struct nfs4_lock_state
*lsp
,
1006 TP_ARGS(state
, lsp
, error
),
1009 __field(unsigned long, error
)
1011 __field(u32
, fhandle
)
1012 __field(u64
, fileid
)
1013 __field(int, stateid_seq
)
1014 __field(u32
, stateid_hash
)
1018 const struct inode
*inode
= state
->inode
;
1020 __entry
->error
= error
< 0 ? -error
: 0;
1021 __entry
->dev
= inode
->i_sb
->s_dev
;
1022 __entry
->fileid
= NFS_FILEID(inode
);
1023 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
1024 __entry
->stateid_seq
=
1025 be32_to_cpu(state
->stateid
.seqid
);
1026 __entry
->stateid_hash
=
1027 nfs_stateid_hash(&state
->stateid
);
1031 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
1032 "stateid=%d:0x%08x",
1034 show_nfs4_status(__entry
->error
),
1035 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1036 (unsigned long long)__entry
->fileid
,
1038 __entry
->stateid_seq
, __entry
->stateid_hash
1042 #define DEFINE_NFS4_TEST_STATEID_EVENT(name) \
1043 DEFINE_EVENT(nfs4_test_stateid_event, name, \
1045 const struct nfs4_state *state, \
1046 const struct nfs4_lock_state *lsp, \
1049 TP_ARGS(state, lsp, error))
1050 DEFINE_NFS4_TEST_STATEID_EVENT(nfs4_test_delegation_stateid
);
1051 DEFINE_NFS4_TEST_STATEID_EVENT(nfs4_test_open_stateid
);
1052 DEFINE_NFS4_TEST_STATEID_EVENT(nfs4_test_lock_stateid
);
1053 #endif /* CONFIG_NFS_V4_1 */
1055 DECLARE_EVENT_CLASS(nfs4_lookup_event
,
1057 const struct inode
*dir
,
1058 const struct qstr
*name
,
1062 TP_ARGS(dir
, name
, error
),
1066 __field(unsigned long, error
)
1068 __string(name
, name
->name
)
1072 __entry
->dev
= dir
->i_sb
->s_dev
;
1073 __entry
->dir
= NFS_FILEID(dir
);
1074 __entry
->error
= -error
;
1079 "error=%ld (%s) name=%02x:%02x:%llu/%s",
1081 show_nfs4_status(__entry
->error
),
1082 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1083 (unsigned long long)__entry
->dir
,
1088 #define DEFINE_NFS4_LOOKUP_EVENT(name) \
1089 DEFINE_EVENT(nfs4_lookup_event, name, \
1091 const struct inode *dir, \
1092 const struct qstr *name, \
1095 TP_ARGS(dir, name, error))
1097 DEFINE_NFS4_LOOKUP_EVENT(nfs4_lookup
);
1098 DEFINE_NFS4_LOOKUP_EVENT(nfs4_symlink
);
1099 DEFINE_NFS4_LOOKUP_EVENT(nfs4_mkdir
);
1100 DEFINE_NFS4_LOOKUP_EVENT(nfs4_mknod
);
1101 DEFINE_NFS4_LOOKUP_EVENT(nfs4_remove
);
1102 DEFINE_NFS4_LOOKUP_EVENT(nfs4_get_fs_locations
);
1103 DEFINE_NFS4_LOOKUP_EVENT(nfs4_secinfo
);
1105 TRACE_EVENT(nfs4_lookupp
,
1107 const struct inode
*inode
,
1111 TP_ARGS(inode
, error
),
1116 __field(unsigned long, error
)
1120 __entry
->dev
= inode
->i_sb
->s_dev
;
1121 __entry
->ino
= NFS_FILEID(inode
);
1122 __entry
->error
= error
< 0 ? -error
: 0;
1126 "error=%ld (%s) inode=%02x:%02x:%llu",
1128 show_nfs4_status(__entry
->error
),
1129 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1130 (unsigned long long)__entry
->ino
1134 TRACE_EVENT(nfs4_rename
,
1136 const struct inode
*olddir
,
1137 const struct qstr
*oldname
,
1138 const struct inode
*newdir
,
1139 const struct qstr
*newname
,
1143 TP_ARGS(olddir
, oldname
, newdir
, newname
, error
),
1147 __field(unsigned long, error
)
1148 __field(u64
, olddir
)
1149 __string(oldname
, oldname
->name
)
1150 __field(u64
, newdir
)
1151 __string(newname
, newname
->name
)
1155 __entry
->dev
= olddir
->i_sb
->s_dev
;
1156 __entry
->olddir
= NFS_FILEID(olddir
);
1157 __entry
->newdir
= NFS_FILEID(newdir
);
1158 __entry
->error
= error
< 0 ? -error
: 0;
1159 __assign_str(oldname
);
1160 __assign_str(newname
);
1164 "error=%ld (%s) oldname=%02x:%02x:%llu/%s "
1165 "newname=%02x:%02x:%llu/%s",
1167 show_nfs4_status(__entry
->error
),
1168 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1169 (unsigned long long)__entry
->olddir
,
1171 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1172 (unsigned long long)__entry
->newdir
,
1177 DECLARE_EVENT_CLASS(nfs4_inode_event
,
1179 const struct inode
*inode
,
1183 TP_ARGS(inode
, error
),
1187 __field(u32
, fhandle
)
1188 __field(u64
, fileid
)
1189 __field(unsigned long, error
)
1193 __entry
->dev
= inode
->i_sb
->s_dev
;
1194 __entry
->fileid
= NFS_FILEID(inode
);
1195 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
1196 __entry
->error
= error
< 0 ? -error
: 0;
1200 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x",
1202 show_nfs4_status(__entry
->error
),
1203 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1204 (unsigned long long)__entry
->fileid
,
1209 #define DEFINE_NFS4_INODE_EVENT(name) \
1210 DEFINE_EVENT(nfs4_inode_event, name, \
1212 const struct inode *inode, \
1215 TP_ARGS(inode, error))
1217 DEFINE_NFS4_INODE_EVENT(nfs4_access
);
1218 DEFINE_NFS4_INODE_EVENT(nfs4_readlink
);
1219 DEFINE_NFS4_INODE_EVENT(nfs4_readdir
);
1220 DEFINE_NFS4_INODE_EVENT(nfs4_get_acl
);
1221 DEFINE_NFS4_INODE_EVENT(nfs4_set_acl
);
1222 #ifdef CONFIG_NFS_V4_SECURITY_LABEL
1223 DEFINE_NFS4_INODE_EVENT(nfs4_get_security_label
);
1224 DEFINE_NFS4_INODE_EVENT(nfs4_set_security_label
);
1225 #endif /* CONFIG_NFS_V4_SECURITY_LABEL */
1227 DECLARE_EVENT_CLASS(nfs4_inode_stateid_event
,
1229 const struct inode
*inode
,
1230 const nfs4_stateid
*stateid
,
1234 TP_ARGS(inode
, stateid
, error
),
1238 __field(u32
, fhandle
)
1239 __field(u64
, fileid
)
1240 __field(unsigned long, error
)
1241 __field(int, stateid_seq
)
1242 __field(u32
, stateid_hash
)
1246 __entry
->dev
= inode
->i_sb
->s_dev
;
1247 __entry
->fileid
= NFS_FILEID(inode
);
1248 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
1249 __entry
->error
= error
< 0 ? -error
: 0;
1250 __entry
->stateid_seq
=
1251 be32_to_cpu(stateid
->seqid
);
1252 __entry
->stateid_hash
=
1253 nfs_stateid_hash(stateid
);
1257 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
1258 "stateid=%d:0x%08x",
1260 show_nfs4_status(__entry
->error
),
1261 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1262 (unsigned long long)__entry
->fileid
,
1264 __entry
->stateid_seq
, __entry
->stateid_hash
1268 #define DEFINE_NFS4_INODE_STATEID_EVENT(name) \
1269 DEFINE_EVENT(nfs4_inode_stateid_event, name, \
1271 const struct inode *inode, \
1272 const nfs4_stateid *stateid, \
1275 TP_ARGS(inode, stateid, error))
1277 DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_setattr
);
1278 DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_delegreturn
);
1279 DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_open_stateid_update
);
1280 DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_open_stateid_update_wait
);
1281 DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_close_stateid_update_wait
);
1283 DECLARE_EVENT_CLASS(nfs4_getattr_event
,
1285 const struct nfs_server
*server
,
1286 const struct nfs_fh
*fhandle
,
1287 const struct nfs_fattr
*fattr
,
1291 TP_ARGS(server
, fhandle
, fattr
, error
),
1295 __field(u32
, fhandle
)
1296 __field(u64
, fileid
)
1297 __field(unsigned int, valid
)
1298 __field(unsigned long, error
)
1302 __entry
->dev
= server
->s_dev
;
1303 __entry
->valid
= fattr
->valid
;
1304 __entry
->fhandle
= nfs_fhandle_hash(fhandle
);
1305 __entry
->fileid
= (fattr
->valid
& NFS_ATTR_FATTR_FILEID
) ? fattr
->fileid
: 0;
1306 __entry
->error
= error
< 0 ? -error
: 0;
1310 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
1313 show_nfs4_status(__entry
->error
),
1314 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1315 (unsigned long long)__entry
->fileid
,
1317 show_nfs_fattr_flags(__entry
->valid
)
1321 #define DEFINE_NFS4_GETATTR_EVENT(name) \
1322 DEFINE_EVENT(nfs4_getattr_event, name, \
1324 const struct nfs_server *server, \
1325 const struct nfs_fh *fhandle, \
1326 const struct nfs_fattr *fattr, \
1329 TP_ARGS(server, fhandle, fattr, error))
1330 DEFINE_NFS4_GETATTR_EVENT(nfs4_getattr
);
1331 DEFINE_NFS4_GETATTR_EVENT(nfs4_lookup_root
);
1332 DEFINE_NFS4_GETATTR_EVENT(nfs4_fsinfo
);
1334 DECLARE_EVENT_CLASS(nfs4_inode_callback_event
,
1336 const struct nfs_client
*clp
,
1337 const struct nfs_fh
*fhandle
,
1338 const struct inode
*inode
,
1342 TP_ARGS(clp
, fhandle
, inode
, error
),
1345 __field(unsigned long, error
)
1347 __field(u32
, fhandle
)
1348 __field(u64
, fileid
)
1349 __string(dstaddr
, clp
? clp
->cl_hostname
: "unknown")
1353 __entry
->error
= error
< 0 ? -error
: 0;
1354 __entry
->fhandle
= nfs_fhandle_hash(fhandle
);
1355 if (!IS_ERR_OR_NULL(inode
)) {
1356 __entry
->fileid
= NFS_FILEID(inode
);
1357 __entry
->dev
= inode
->i_sb
->s_dev
;
1359 __entry
->fileid
= 0;
1362 __assign_str(dstaddr
);
1366 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
1369 show_nfs4_status(__entry
->error
),
1370 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1371 (unsigned long long)__entry
->fileid
,
1377 #define DEFINE_NFS4_INODE_CALLBACK_EVENT(name) \
1378 DEFINE_EVENT(nfs4_inode_callback_event, name, \
1380 const struct nfs_client *clp, \
1381 const struct nfs_fh *fhandle, \
1382 const struct inode *inode, \
1385 TP_ARGS(clp, fhandle, inode, error))
1386 DEFINE_NFS4_INODE_CALLBACK_EVENT(nfs4_cb_getattr
);
1388 DECLARE_EVENT_CLASS(nfs4_inode_stateid_callback_event
,
1390 const struct nfs_client
*clp
,
1391 const struct nfs_fh
*fhandle
,
1392 const struct inode
*inode
,
1393 const nfs4_stateid
*stateid
,
1397 TP_ARGS(clp
, fhandle
, inode
, stateid
, error
),
1400 __field(unsigned long, error
)
1402 __field(u32
, fhandle
)
1403 __field(u64
, fileid
)
1404 __string(dstaddr
, clp
? clp
->cl_hostname
: "unknown")
1405 __field(int, stateid_seq
)
1406 __field(u32
, stateid_hash
)
1410 __entry
->error
= error
< 0 ? -error
: 0;
1411 __entry
->fhandle
= nfs_fhandle_hash(fhandle
);
1412 if (!IS_ERR_OR_NULL(inode
)) {
1413 __entry
->fileid
= NFS_FILEID(inode
);
1414 __entry
->dev
= inode
->i_sb
->s_dev
;
1416 __entry
->fileid
= 0;
1419 __assign_str(dstaddr
);
1420 __entry
->stateid_seq
=
1421 be32_to_cpu(stateid
->seqid
);
1422 __entry
->stateid_hash
=
1423 nfs_stateid_hash(stateid
);
1427 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
1428 "stateid=%d:0x%08x dstaddr=%s",
1430 show_nfs4_status(__entry
->error
),
1431 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1432 (unsigned long long)__entry
->fileid
,
1434 __entry
->stateid_seq
, __entry
->stateid_hash
,
1439 #define DEFINE_NFS4_INODE_STATEID_CALLBACK_EVENT(name) \
1440 DEFINE_EVENT(nfs4_inode_stateid_callback_event, name, \
1442 const struct nfs_client *clp, \
1443 const struct nfs_fh *fhandle, \
1444 const struct inode *inode, \
1445 const nfs4_stateid *stateid, \
1448 TP_ARGS(clp, fhandle, inode, stateid, error))
1449 DEFINE_NFS4_INODE_STATEID_CALLBACK_EVENT(nfs4_cb_recall
);
1450 DEFINE_NFS4_INODE_STATEID_CALLBACK_EVENT(nfs4_cb_layoutrecall_file
);
1452 DECLARE_EVENT_CLASS(nfs4_idmap_event
,
1460 TP_ARGS(name
, len
, id
, error
),
1463 __field(unsigned long, error
)
1465 __dynamic_array(char, name
, len
> 0 ? len
+ 1 : 1)
1471 __entry
->error
= error
< 0 ? error
: 0;
1473 memcpy(__get_str(name
), name
, len
);
1474 __get_str(name
)[len
] = 0;
1478 "error=%ld (%s) id=%u name=%s",
1479 -__entry
->error
, show_nfs4_status(__entry
->error
),
1484 #define DEFINE_NFS4_IDMAP_EVENT(name) \
1485 DEFINE_EVENT(nfs4_idmap_event, name, \
1492 TP_ARGS(name, len, id, error))
1493 DEFINE_NFS4_IDMAP_EVENT(nfs4_map_name_to_uid
);
1494 DEFINE_NFS4_IDMAP_EVENT(nfs4_map_group_to_gid
);
1495 DEFINE_NFS4_IDMAP_EVENT(nfs4_map_uid_to_name
);
1496 DEFINE_NFS4_IDMAP_EVENT(nfs4_map_gid_to_group
);
1498 #ifdef CONFIG_NFS_V4_1
1499 #define NFS4_LSEG_LAYOUT_STATEID_HASH(lseg) \
1500 (lseg ? nfs_stateid_hash(&lseg->pls_layout->plh_stateid) : 0)
1502 #define NFS4_LSEG_LAYOUT_STATEID_HASH(lseg) (0)
1505 DECLARE_EVENT_CLASS(nfs4_read_event
,
1507 const struct nfs_pgio_header
*hdr
,
1511 TP_ARGS(hdr
, error
),
1515 __field(u32
, fhandle
)
1516 __field(u64
, fileid
)
1517 __field(loff_t
, offset
)
1518 __field(u32
, arg_count
)
1519 __field(u32
, res_count
)
1520 __field(unsigned long, error
)
1521 __field(int, stateid_seq
)
1522 __field(u32
, stateid_hash
)
1523 __field(int, layoutstateid_seq
)
1524 __field(u32
, layoutstateid_hash
)
1528 const struct inode
*inode
= hdr
->inode
;
1529 const struct nfs_inode
*nfsi
= NFS_I(inode
);
1530 const struct nfs_fh
*fh
= hdr
->args
.fh
?
1531 hdr
->args
.fh
: &nfsi
->fh
;
1532 const struct nfs4_state
*state
=
1533 hdr
->args
.context
->state
;
1534 const struct pnfs_layout_segment
*lseg
= hdr
->lseg
;
1536 __entry
->dev
= inode
->i_sb
->s_dev
;
1537 __entry
->fileid
= nfsi
->fileid
;
1538 __entry
->fhandle
= nfs_fhandle_hash(fh
);
1539 __entry
->offset
= hdr
->args
.offset
;
1540 __entry
->arg_count
= hdr
->args
.count
;
1541 __entry
->res_count
= hdr
->res
.count
;
1542 __entry
->error
= error
< 0 ? -error
: 0;
1543 __entry
->stateid_seq
=
1544 be32_to_cpu(state
->stateid
.seqid
);
1545 __entry
->stateid_hash
=
1546 nfs_stateid_hash(&state
->stateid
);
1547 __entry
->layoutstateid_seq
= lseg
? lseg
->pls_seq
: 0;
1548 __entry
->layoutstateid_hash
=
1549 NFS4_LSEG_LAYOUT_STATEID_HASH(lseg
);
1553 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
1554 "offset=%lld count=%u res=%u stateid=%d:0x%08x "
1555 "layoutstateid=%d:0x%08x",
1557 show_nfs4_status(__entry
->error
),
1558 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1559 (unsigned long long)__entry
->fileid
,
1561 (long long)__entry
->offset
,
1562 __entry
->arg_count
, __entry
->res_count
,
1563 __entry
->stateid_seq
, __entry
->stateid_hash
,
1564 __entry
->layoutstateid_seq
, __entry
->layoutstateid_hash
1567 #define DEFINE_NFS4_READ_EVENT(name) \
1568 DEFINE_EVENT(nfs4_read_event, name, \
1570 const struct nfs_pgio_header *hdr, \
1573 TP_ARGS(hdr, error))
1574 DEFINE_NFS4_READ_EVENT(nfs4_read
);
1575 #ifdef CONFIG_NFS_V4_1
1576 DEFINE_NFS4_READ_EVENT(nfs4_pnfs_read
);
1577 #endif /* CONFIG_NFS_V4_1 */
1579 DECLARE_EVENT_CLASS(nfs4_write_event
,
1581 const struct nfs_pgio_header
*hdr
,
1585 TP_ARGS(hdr
, error
),
1589 __field(u32
, fhandle
)
1590 __field(u64
, fileid
)
1591 __field(loff_t
, offset
)
1592 __field(u32
, arg_count
)
1593 __field(u32
, res_count
)
1594 __field(unsigned long, error
)
1595 __field(int, stateid_seq
)
1596 __field(u32
, stateid_hash
)
1597 __field(int, layoutstateid_seq
)
1598 __field(u32
, layoutstateid_hash
)
1602 const struct inode
*inode
= hdr
->inode
;
1603 const struct nfs_inode
*nfsi
= NFS_I(inode
);
1604 const struct nfs_fh
*fh
= hdr
->args
.fh
?
1605 hdr
->args
.fh
: &nfsi
->fh
;
1606 const struct nfs4_state
*state
=
1607 hdr
->args
.context
->state
;
1608 const struct pnfs_layout_segment
*lseg
= hdr
->lseg
;
1610 __entry
->dev
= inode
->i_sb
->s_dev
;
1611 __entry
->fileid
= nfsi
->fileid
;
1612 __entry
->fhandle
= nfs_fhandle_hash(fh
);
1613 __entry
->offset
= hdr
->args
.offset
;
1614 __entry
->arg_count
= hdr
->args
.count
;
1615 __entry
->res_count
= hdr
->res
.count
;
1616 __entry
->error
= error
< 0 ? -error
: 0;
1617 __entry
->stateid_seq
=
1618 be32_to_cpu(state
->stateid
.seqid
);
1619 __entry
->stateid_hash
=
1620 nfs_stateid_hash(&state
->stateid
);
1621 __entry
->layoutstateid_seq
= lseg
? lseg
->pls_seq
: 0;
1622 __entry
->layoutstateid_hash
=
1623 NFS4_LSEG_LAYOUT_STATEID_HASH(lseg
);
1627 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
1628 "offset=%lld count=%u res=%u stateid=%d:0x%08x "
1629 "layoutstateid=%d:0x%08x",
1631 show_nfs4_status(__entry
->error
),
1632 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1633 (unsigned long long)__entry
->fileid
,
1635 (long long)__entry
->offset
,
1636 __entry
->arg_count
, __entry
->res_count
,
1637 __entry
->stateid_seq
, __entry
->stateid_hash
,
1638 __entry
->layoutstateid_seq
, __entry
->layoutstateid_hash
1642 #define DEFINE_NFS4_WRITE_EVENT(name) \
1643 DEFINE_EVENT(nfs4_write_event, name, \
1645 const struct nfs_pgio_header *hdr, \
1648 TP_ARGS(hdr, error))
1649 DEFINE_NFS4_WRITE_EVENT(nfs4_write
);
1650 #ifdef CONFIG_NFS_V4_1
1651 DEFINE_NFS4_WRITE_EVENT(nfs4_pnfs_write
);
1652 #endif /* CONFIG_NFS_V4_1 */
1654 DECLARE_EVENT_CLASS(nfs4_commit_event
,
1656 const struct nfs_commit_data
*data
,
1660 TP_ARGS(data
, error
),
1664 __field(u32
, fhandle
)
1665 __field(u64
, fileid
)
1666 __field(unsigned long, error
)
1667 __field(loff_t
, offset
)
1669 __field(int, layoutstateid_seq
)
1670 __field(u32
, layoutstateid_hash
)
1674 const struct inode
*inode
= data
->inode
;
1675 const struct nfs_inode
*nfsi
= NFS_I(inode
);
1676 const struct nfs_fh
*fh
= data
->args
.fh
?
1677 data
->args
.fh
: &nfsi
->fh
;
1678 const struct pnfs_layout_segment
*lseg
= data
->lseg
;
1680 __entry
->dev
= inode
->i_sb
->s_dev
;
1681 __entry
->fileid
= nfsi
->fileid
;
1682 __entry
->fhandle
= nfs_fhandle_hash(fh
);
1683 __entry
->offset
= data
->args
.offset
;
1684 __entry
->count
= data
->args
.count
;
1685 __entry
->error
= error
< 0 ? -error
: 0;
1686 __entry
->layoutstateid_seq
= lseg
? lseg
->pls_seq
: 0;
1687 __entry
->layoutstateid_hash
=
1688 NFS4_LSEG_LAYOUT_STATEID_HASH(lseg
);
1692 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
1693 "offset=%lld count=%u layoutstateid=%d:0x%08x",
1695 show_nfs4_status(__entry
->error
),
1696 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1697 (unsigned long long)__entry
->fileid
,
1699 (long long)__entry
->offset
,
1701 __entry
->layoutstateid_seq
, __entry
->layoutstateid_hash
1704 #define DEFINE_NFS4_COMMIT_EVENT(name) \
1705 DEFINE_EVENT(nfs4_commit_event, name, \
1707 const struct nfs_commit_data *data, \
1710 TP_ARGS(data, error))
1711 DEFINE_NFS4_COMMIT_EVENT(nfs4_commit
);
1712 #ifdef CONFIG_NFS_V4_1
1713 DEFINE_NFS4_COMMIT_EVENT(nfs4_pnfs_commit_ds
);
1715 TRACE_EVENT(nfs4_layoutget
,
1717 const struct nfs_open_context
*ctx
,
1718 const struct pnfs_layout_range
*args
,
1719 const struct pnfs_layout_range
*res
,
1720 const nfs4_stateid
*layout_stateid
,
1724 TP_ARGS(ctx
, args
, res
, layout_stateid
, error
),
1728 __field(u32
, fhandle
)
1729 __field(u64
, fileid
)
1730 __field(u32
, iomode
)
1731 __field(u64
, offset
)
1733 __field(unsigned long, error
)
1734 __field(int, stateid_seq
)
1735 __field(u32
, stateid_hash
)
1736 __field(int, layoutstateid_seq
)
1737 __field(u32
, layoutstateid_hash
)
1741 const struct inode
*inode
= d_inode(ctx
->dentry
);
1742 const struct nfs4_state
*state
= ctx
->state
;
1743 __entry
->dev
= inode
->i_sb
->s_dev
;
1744 __entry
->fileid
= NFS_FILEID(inode
);
1745 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
1746 __entry
->iomode
= args
->iomode
;
1747 __entry
->offset
= args
->offset
;
1748 __entry
->count
= args
->length
;
1749 __entry
->error
= error
< 0 ? -error
: 0;
1750 __entry
->stateid_seq
=
1751 be32_to_cpu(state
->stateid
.seqid
);
1752 __entry
->stateid_hash
=
1753 nfs_stateid_hash(&state
->stateid
);
1755 __entry
->layoutstateid_seq
=
1756 be32_to_cpu(layout_stateid
->seqid
);
1757 __entry
->layoutstateid_hash
=
1758 nfs_stateid_hash(layout_stateid
);
1760 __entry
->layoutstateid_seq
= 0;
1761 __entry
->layoutstateid_hash
= 0;
1766 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
1767 "iomode=%s offset=%llu count=%llu stateid=%d:0x%08x "
1768 "layoutstateid=%d:0x%08x",
1770 show_nfs4_status(__entry
->error
),
1771 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1772 (unsigned long long)__entry
->fileid
,
1774 show_pnfs_layout_iomode(__entry
->iomode
),
1775 (unsigned long long)__entry
->offset
,
1776 (unsigned long long)__entry
->count
,
1777 __entry
->stateid_seq
, __entry
->stateid_hash
,
1778 __entry
->layoutstateid_seq
, __entry
->layoutstateid_hash
1782 DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_layoutcommit
);
1783 DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_layoutreturn
);
1784 DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_layoutreturn_on_close
);
1785 DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_layouterror
);
1786 DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_layoutstats
);
1788 TRACE_DEFINE_ENUM(PNFS_UPDATE_LAYOUT_UNKNOWN
);
1789 TRACE_DEFINE_ENUM(PNFS_UPDATE_LAYOUT_NO_PNFS
);
1790 TRACE_DEFINE_ENUM(PNFS_UPDATE_LAYOUT_RD_ZEROLEN
);
1791 TRACE_DEFINE_ENUM(PNFS_UPDATE_LAYOUT_MDSTHRESH
);
1792 TRACE_DEFINE_ENUM(PNFS_UPDATE_LAYOUT_NOMEM
);
1793 TRACE_DEFINE_ENUM(PNFS_UPDATE_LAYOUT_BULK_RECALL
);
1794 TRACE_DEFINE_ENUM(PNFS_UPDATE_LAYOUT_IO_TEST_FAIL
);
1795 TRACE_DEFINE_ENUM(PNFS_UPDATE_LAYOUT_FOUND_CACHED
);
1796 TRACE_DEFINE_ENUM(PNFS_UPDATE_LAYOUT_RETURN
);
1797 TRACE_DEFINE_ENUM(PNFS_UPDATE_LAYOUT_BLOCKED
);
1798 TRACE_DEFINE_ENUM(PNFS_UPDATE_LAYOUT_INVALID_OPEN
);
1799 TRACE_DEFINE_ENUM(PNFS_UPDATE_LAYOUT_RETRY
);
1800 TRACE_DEFINE_ENUM(PNFS_UPDATE_LAYOUT_SEND_LAYOUTGET
);
1801 TRACE_DEFINE_ENUM(PNFS_UPDATE_LAYOUT_EXIT
);
1803 #define show_pnfs_update_layout_reason(reason) \
1804 __print_symbolic(reason, \
1805 { PNFS_UPDATE_LAYOUT_UNKNOWN, "unknown" }, \
1806 { PNFS_UPDATE_LAYOUT_NO_PNFS, "no pnfs" }, \
1807 { PNFS_UPDATE_LAYOUT_RD_ZEROLEN, "read+zerolen" }, \
1808 { PNFS_UPDATE_LAYOUT_MDSTHRESH, "mdsthresh" }, \
1809 { PNFS_UPDATE_LAYOUT_NOMEM, "nomem" }, \
1810 { PNFS_UPDATE_LAYOUT_BULK_RECALL, "bulk recall" }, \
1811 { PNFS_UPDATE_LAYOUT_IO_TEST_FAIL, "io test fail" }, \
1812 { PNFS_UPDATE_LAYOUT_FOUND_CACHED, "found cached" }, \
1813 { PNFS_UPDATE_LAYOUT_RETURN, "layoutreturn" }, \
1814 { PNFS_UPDATE_LAYOUT_BLOCKED, "layouts blocked" }, \
1815 { PNFS_UPDATE_LAYOUT_INVALID_OPEN, "invalid open" }, \
1816 { PNFS_UPDATE_LAYOUT_RETRY, "retrying" }, \
1817 { PNFS_UPDATE_LAYOUT_SEND_LAYOUTGET, "sent layoutget" }, \
1818 { PNFS_UPDATE_LAYOUT_EXIT, "exit" })
1820 TRACE_EVENT(pnfs_update_layout
,
1821 TP_PROTO(struct inode
*inode
,
1824 enum pnfs_iomode iomode
,
1825 struct pnfs_layout_hdr
*lo
,
1826 struct pnfs_layout_segment
*lseg
,
1827 enum pnfs_update_layout_reason reason
1829 TP_ARGS(inode
, pos
, count
, iomode
, lo
, lseg
, reason
),
1832 __field(u64
, fileid
)
1833 __field(u32
, fhandle
)
1834 __field(loff_t
, pos
)
1836 __field(enum pnfs_iomode
, iomode
)
1837 __field(int, layoutstateid_seq
)
1838 __field(u32
, layoutstateid_hash
)
1840 __field(enum pnfs_update_layout_reason
, reason
)
1843 __entry
->dev
= inode
->i_sb
->s_dev
;
1844 __entry
->fileid
= NFS_FILEID(inode
);
1845 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
1847 __entry
->count
= count
;
1848 __entry
->iomode
= iomode
;
1849 __entry
->reason
= reason
;
1850 if (lo
!= NULL
&& pnfs_layout_is_valid(lo
)) {
1851 __entry
->layoutstateid_seq
=
1852 be32_to_cpu(lo
->plh_stateid
.seqid
);
1853 __entry
->layoutstateid_hash
=
1854 nfs_stateid_hash(&lo
->plh_stateid
);
1856 __entry
->layoutstateid_seq
= 0;
1857 __entry
->layoutstateid_hash
= 0;
1859 __entry
->lseg
= (long)lseg
;
1862 "fileid=%02x:%02x:%llu fhandle=0x%08x "
1863 "iomode=%s pos=%llu count=%llu "
1864 "layoutstateid=%d:0x%08x lseg=0x%lx (%s)",
1865 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1866 (unsigned long long)__entry
->fileid
,
1868 show_pnfs_layout_iomode(__entry
->iomode
),
1869 (unsigned long long)__entry
->pos
,
1870 (unsigned long long)__entry
->count
,
1871 __entry
->layoutstateid_seq
, __entry
->layoutstateid_hash
,
1873 show_pnfs_update_layout_reason(__entry
->reason
)
1877 DECLARE_EVENT_CLASS(pnfs_layout_event
,
1878 TP_PROTO(struct inode
*inode
,
1881 enum pnfs_iomode iomode
,
1882 struct pnfs_layout_hdr
*lo
,
1883 struct pnfs_layout_segment
*lseg
1885 TP_ARGS(inode
, pos
, count
, iomode
, lo
, lseg
),
1888 __field(u64
, fileid
)
1889 __field(u32
, fhandle
)
1890 __field(loff_t
, pos
)
1892 __field(enum pnfs_iomode
, iomode
)
1893 __field(int, layoutstateid_seq
)
1894 __field(u32
, layoutstateid_hash
)
1898 __entry
->dev
= inode
->i_sb
->s_dev
;
1899 __entry
->fileid
= NFS_FILEID(inode
);
1900 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
1902 __entry
->count
= count
;
1903 __entry
->iomode
= iomode
;
1904 if (lo
!= NULL
&& pnfs_layout_is_valid(lo
)) {
1905 __entry
->layoutstateid_seq
=
1906 be32_to_cpu(lo
->plh_stateid
.seqid
);
1907 __entry
->layoutstateid_hash
=
1908 nfs_stateid_hash(&lo
->plh_stateid
);
1910 __entry
->layoutstateid_seq
= 0;
1911 __entry
->layoutstateid_hash
= 0;
1913 __entry
->lseg
= (long)lseg
;
1916 "fileid=%02x:%02x:%llu fhandle=0x%08x "
1917 "iomode=%s pos=%llu count=%llu "
1918 "layoutstateid=%d:0x%08x lseg=0x%lx",
1919 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1920 (unsigned long long)__entry
->fileid
,
1922 show_pnfs_layout_iomode(__entry
->iomode
),
1923 (unsigned long long)__entry
->pos
,
1924 (unsigned long long)__entry
->count
,
1925 __entry
->layoutstateid_seq
, __entry
->layoutstateid_hash
,
1930 #define DEFINE_PNFS_LAYOUT_EVENT(name) \
1931 DEFINE_EVENT(pnfs_layout_event, name, \
1932 TP_PROTO(struct inode *inode, \
1935 enum pnfs_iomode iomode, \
1936 struct pnfs_layout_hdr *lo, \
1937 struct pnfs_layout_segment *lseg \
1939 TP_ARGS(inode, pos, count, iomode, lo, lseg))
1941 DEFINE_PNFS_LAYOUT_EVENT(pnfs_mds_fallback_pg_init_read
);
1942 DEFINE_PNFS_LAYOUT_EVENT(pnfs_mds_fallback_pg_init_write
);
1943 DEFINE_PNFS_LAYOUT_EVENT(pnfs_mds_fallback_pg_get_mirror_count
);
1944 DEFINE_PNFS_LAYOUT_EVENT(pnfs_mds_fallback_read_done
);
1945 DEFINE_PNFS_LAYOUT_EVENT(pnfs_mds_fallback_write_done
);
1946 DEFINE_PNFS_LAYOUT_EVENT(pnfs_mds_fallback_read_pagelist
);
1947 DEFINE_PNFS_LAYOUT_EVENT(pnfs_mds_fallback_write_pagelist
);
1949 DECLARE_EVENT_CLASS(nfs4_deviceid_event
,
1951 const struct nfs_client
*clp
,
1952 const struct nfs4_deviceid
*deviceid
1955 TP_ARGS(clp
, deviceid
),
1958 __string(dstaddr
, clp
->cl_hostname
)
1959 __array(unsigned char, deviceid
, NFS4_DEVICEID4_SIZE
)
1963 __assign_str(dstaddr
);
1964 memcpy(__entry
->deviceid
, deviceid
->data
,
1965 NFS4_DEVICEID4_SIZE
);
1969 "deviceid=%s, dstaddr=%s",
1970 __print_hex(__entry
->deviceid
, NFS4_DEVICEID4_SIZE
),
1974 #define DEFINE_PNFS_DEVICEID_EVENT(name) \
1975 DEFINE_EVENT(nfs4_deviceid_event, name, \
1976 TP_PROTO(const struct nfs_client *clp, \
1977 const struct nfs4_deviceid *deviceid \
1979 TP_ARGS(clp, deviceid))
1980 DEFINE_PNFS_DEVICEID_EVENT(nfs4_deviceid_free
);
1982 DECLARE_EVENT_CLASS(nfs4_deviceid_status
,
1984 const struct nfs_server
*server
,
1985 const struct nfs4_deviceid
*deviceid
,
1989 TP_ARGS(server
, deviceid
, status
),
1993 __field(int, status
)
1994 __string(dstaddr
, server
->nfs_client
->cl_hostname
)
1995 __array(unsigned char, deviceid
, NFS4_DEVICEID4_SIZE
)
1999 __entry
->dev
= server
->s_dev
;
2000 __entry
->status
= status
;
2001 __assign_str(dstaddr
);
2002 memcpy(__entry
->deviceid
, deviceid
->data
,
2003 NFS4_DEVICEID4_SIZE
);
2007 "dev=%02x:%02x: deviceid=%s, dstaddr=%s, status=%d",
2008 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2009 __print_hex(__entry
->deviceid
, NFS4_DEVICEID4_SIZE
),
2014 #define DEFINE_PNFS_DEVICEID_STATUS(name) \
2015 DEFINE_EVENT(nfs4_deviceid_status, name, \
2016 TP_PROTO(const struct nfs_server *server, \
2017 const struct nfs4_deviceid *deviceid, \
2020 TP_ARGS(server, deviceid, status))
2021 DEFINE_PNFS_DEVICEID_STATUS(nfs4_getdeviceinfo
);
2022 DEFINE_PNFS_DEVICEID_STATUS(nfs4_find_deviceid
);
2024 TRACE_EVENT(fl_getdevinfo
,
2026 const struct nfs_server
*server
,
2027 const struct nfs4_deviceid
*deviceid
,
2030 TP_ARGS(server
, deviceid
, ds_remotestr
),
2033 __string(mds_addr
, server
->nfs_client
->cl_hostname
)
2034 __array(unsigned char, deviceid
, NFS4_DEVICEID4_SIZE
)
2035 __string(ds_ips
, ds_remotestr
)
2039 __assign_str(mds_addr
);
2040 __assign_str(ds_ips
);
2041 memcpy(__entry
->deviceid
, deviceid
->data
,
2042 NFS4_DEVICEID4_SIZE
);
2045 "deviceid=%s, mds_addr=%s, ds_ips=%s",
2046 __print_hex(__entry
->deviceid
, NFS4_DEVICEID4_SIZE
),
2047 __get_str(mds_addr
),
2052 DECLARE_EVENT_CLASS(nfs4_flexfiles_io_event
,
2054 const struct nfs_pgio_header
*hdr
2060 __field(unsigned long, error
)
2062 __field(u32
, fhandle
)
2063 __field(u64
, fileid
)
2064 __field(loff_t
, offset
)
2066 __field(int, stateid_seq
)
2067 __field(u32
, stateid_hash
)
2068 __string(dstaddr
, hdr
->ds_clp
?
2069 rpc_peeraddr2str(hdr
->ds_clp
->cl_rpcclient
,
2070 RPC_DISPLAY_ADDR
) : "unknown")
2074 const struct inode
*inode
= hdr
->inode
;
2076 __entry
->error
= hdr
->res
.op_status
;
2077 __entry
->fhandle
= nfs_fhandle_hash(hdr
->args
.fh
);
2078 __entry
->fileid
= NFS_FILEID(inode
);
2079 __entry
->dev
= inode
->i_sb
->s_dev
;
2080 __entry
->offset
= hdr
->args
.offset
;
2081 __entry
->count
= hdr
->args
.count
;
2082 __entry
->stateid_seq
=
2083 be32_to_cpu(hdr
->args
.stateid
.seqid
);
2084 __entry
->stateid_hash
=
2085 nfs_stateid_hash(&hdr
->args
.stateid
);
2086 __assign_str(dstaddr
);
2090 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
2091 "offset=%llu count=%u stateid=%d:0x%08x dstaddr=%s",
2093 show_nfs4_status(__entry
->error
),
2094 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2095 (unsigned long long)__entry
->fileid
,
2097 __entry
->offset
, __entry
->count
,
2098 __entry
->stateid_seq
, __entry
->stateid_hash
,
2103 #define DEFINE_NFS4_FLEXFILES_IO_EVENT(name) \
2104 DEFINE_EVENT(nfs4_flexfiles_io_event, name, \
2106 const struct nfs_pgio_header *hdr \
2109 DEFINE_NFS4_FLEXFILES_IO_EVENT(ff_layout_read_error
);
2110 DEFINE_NFS4_FLEXFILES_IO_EVENT(ff_layout_write_error
);
2112 TRACE_EVENT(ff_layout_commit_error
,
2114 const struct nfs_commit_data
*data
2120 __field(unsigned long, error
)
2122 __field(u32
, fhandle
)
2123 __field(u64
, fileid
)
2124 __field(loff_t
, offset
)
2126 __string(dstaddr
, data
->ds_clp
?
2127 rpc_peeraddr2str(data
->ds_clp
->cl_rpcclient
,
2128 RPC_DISPLAY_ADDR
) : "unknown")
2132 const struct inode
*inode
= data
->inode
;
2134 __entry
->error
= data
->res
.op_status
;
2135 __entry
->fhandle
= nfs_fhandle_hash(data
->args
.fh
);
2136 __entry
->fileid
= NFS_FILEID(inode
);
2137 __entry
->dev
= inode
->i_sb
->s_dev
;
2138 __entry
->offset
= data
->args
.offset
;
2139 __entry
->count
= data
->args
.count
;
2140 __assign_str(dstaddr
);
2144 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
2145 "offset=%llu count=%u dstaddr=%s",
2147 show_nfs4_status(__entry
->error
),
2148 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2149 (unsigned long long)__entry
->fileid
,
2151 __entry
->offset
, __entry
->count
,
2156 DECLARE_EVENT_CLASS(pnfs_bl_pr_key_class
,
2158 const struct block_device
*bdev
,
2165 __string(device
, bdev
->bd_disk
->disk_name
)
2169 __entry
->dev
= bdev
->bd_dev
;
2170 __assign_str(device
);
2172 TP_printk("dev=%d,%d (%s) key=0x%016llx",
2173 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2174 __get_str(device
), __entry
->key
2178 #define DEFINE_NFS4_BLOCK_PRKEY_EVENT(name) \
2179 DEFINE_EVENT(pnfs_bl_pr_key_class, name, \
2181 const struct block_device *bdev, \
2185 DEFINE_NFS4_BLOCK_PRKEY_EVENT(bl_pr_key_reg
);
2186 DEFINE_NFS4_BLOCK_PRKEY_EVENT(bl_pr_key_unreg
);
2189 * From uapi/linux/pr.h
2191 TRACE_DEFINE_ENUM(PR_STS_SUCCESS
);
2192 TRACE_DEFINE_ENUM(PR_STS_IOERR
);
2193 TRACE_DEFINE_ENUM(PR_STS_RESERVATION_CONFLICT
);
2194 TRACE_DEFINE_ENUM(PR_STS_RETRY_PATH_FAILURE
);
2195 TRACE_DEFINE_ENUM(PR_STS_PATH_FAST_FAILED
);
2196 TRACE_DEFINE_ENUM(PR_STS_PATH_FAILED
);
2198 #define show_pr_status(x) \
2199 __print_symbolic(x, \
2200 { PR_STS_SUCCESS, "SUCCESS" }, \
2201 { PR_STS_IOERR, "IOERR" }, \
2202 { PR_STS_RESERVATION_CONFLICT, "RESERVATION_CONFLICT" }, \
2203 { PR_STS_RETRY_PATH_FAILURE, "RETRY_PATH_FAILURE" }, \
2204 { PR_STS_PATH_FAST_FAILED, "PATH_FAST_FAILED" }, \
2205 { PR_STS_PATH_FAILED, "PATH_FAILED" })
2207 DECLARE_EVENT_CLASS(pnfs_bl_pr_key_err_class
,
2209 const struct block_device
*bdev
,
2213 TP_ARGS(bdev
, key
, status
),
2217 __field(unsigned long, status
)
2218 __string(device
, bdev
->bd_disk
->disk_name
)
2222 __entry
->dev
= bdev
->bd_dev
;
2223 __entry
->status
= status
;
2224 __assign_str(device
);
2226 TP_printk("dev=%d,%d (%s) key=0x%016llx status=%s",
2227 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2228 __get_str(device
), __entry
->key
,
2229 show_pr_status(__entry
->status
)
2233 #define DEFINE_NFS4_BLOCK_PRKEY_ERR_EVENT(name) \
2234 DEFINE_EVENT(pnfs_bl_pr_key_err_class, name, \
2236 const struct block_device *bdev, \
2240 TP_ARGS(bdev, key, status))
2241 DEFINE_NFS4_BLOCK_PRKEY_ERR_EVENT(bl_pr_key_reg_err
);
2242 DEFINE_NFS4_BLOCK_PRKEY_ERR_EVENT(bl_pr_key_unreg_err
);
2244 #ifdef CONFIG_NFS_V4_2
2245 TRACE_DEFINE_ENUM(NFS4_CONTENT_DATA
);
2246 TRACE_DEFINE_ENUM(NFS4_CONTENT_HOLE
);
2248 #define show_llseek_mode(what) \
2249 __print_symbolic(what, \
2250 { NFS4_CONTENT_DATA, "DATA" }, \
2251 { NFS4_CONTENT_HOLE, "HOLE" })
2253 TRACE_EVENT(nfs4_llseek
,
2255 const struct inode
*inode
,
2256 const struct nfs42_seek_args
*args
,
2257 const struct nfs42_seek_res
*res
,
2261 TP_ARGS(inode
, args
, res
, error
),
2264 __field(unsigned long, error
)
2265 __field(u32
, fhandle
)
2266 __field(u32
, fileid
)
2268 __field(int, stateid_seq
)
2269 __field(u32
, stateid_hash
)
2270 __field(loff_t
, offset_s
)
2272 __field(loff_t
, offset_r
)
2277 const struct nfs_inode
*nfsi
= NFS_I(inode
);
2278 const struct nfs_fh
*fh
= args
->sa_fh
;
2280 __entry
->fileid
= nfsi
->fileid
;
2281 __entry
->dev
= inode
->i_sb
->s_dev
;
2282 __entry
->fhandle
= nfs_fhandle_hash(fh
);
2283 __entry
->offset_s
= args
->sa_offset
;
2284 __entry
->stateid_seq
=
2285 be32_to_cpu(args
->sa_stateid
.seqid
);
2286 __entry
->stateid_hash
=
2287 nfs_stateid_hash(&args
->sa_stateid
);
2288 __entry
->what
= args
->sa_what
;
2290 __entry
->error
= -error
;
2291 __entry
->offset_r
= 0;
2295 __entry
->offset_r
= res
->sr_offset
;
2296 __entry
->eof
= res
->sr_eof
;
2301 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
2302 "stateid=%d:0x%08x offset_s=%llu what=%s "
2303 "offset_r=%llu eof=%u",
2305 show_nfs4_status(__entry
->error
),
2306 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2307 (unsigned long long)__entry
->fileid
,
2309 __entry
->stateid_seq
, __entry
->stateid_hash
,
2311 show_llseek_mode(__entry
->what
),
2317 DECLARE_EVENT_CLASS(nfs4_sparse_event
,
2319 const struct inode
*inode
,
2320 const struct nfs42_falloc_args
*args
,
2324 TP_ARGS(inode
, args
, error
),
2327 __field(unsigned long, error
)
2328 __field(loff_t
, offset
)
2329 __field(loff_t
, len
)
2331 __field(u32
, fhandle
)
2332 __field(u64
, fileid
)
2333 __field(int, stateid_seq
)
2334 __field(u32
, stateid_hash
)
2338 __entry
->error
= error
< 0 ? -error
: 0;
2339 __entry
->offset
= args
->falloc_offset
;
2340 __entry
->len
= args
->falloc_length
;
2341 __entry
->dev
= inode
->i_sb
->s_dev
;
2342 __entry
->fileid
= NFS_FILEID(inode
);
2343 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
2344 __entry
->stateid_seq
=
2345 be32_to_cpu(args
->falloc_stateid
.seqid
);
2346 __entry
->stateid_hash
=
2347 nfs_stateid_hash(&args
->falloc_stateid
);
2351 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
2352 "stateid=%d:0x%08x offset=%llu len=%llu",
2354 show_nfs4_status(__entry
->error
),
2355 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2356 (unsigned long long)__entry
->fileid
,
2358 __entry
->stateid_seq
, __entry
->stateid_hash
,
2359 (long long)__entry
->offset
,
2360 (long long)__entry
->len
2363 #define DEFINE_NFS4_SPARSE_EVENT(name) \
2364 DEFINE_EVENT(nfs4_sparse_event, name, \
2366 const struct inode *inode, \
2367 const struct nfs42_falloc_args *args, \
2370 TP_ARGS(inode, args, error))
2371 DEFINE_NFS4_SPARSE_EVENT(nfs4_fallocate
);
2372 DEFINE_NFS4_SPARSE_EVENT(nfs4_deallocate
);
2374 TRACE_EVENT(nfs4_copy
,
2376 const struct inode
*src_inode
,
2377 const struct inode
*dst_inode
,
2378 const struct nfs42_copy_args
*args
,
2379 const struct nfs42_copy_res
*res
,
2380 const struct nl4_server
*nss
,
2384 TP_ARGS(src_inode
, dst_inode
, args
, res
, nss
, error
),
2387 __field(unsigned long, error
)
2388 __field(u32
, src_fhandle
)
2389 __field(u32
, src_fileid
)
2390 __field(u32
, dst_fhandle
)
2391 __field(u32
, dst_fileid
)
2392 __field(dev_t
, src_dev
)
2393 __field(dev_t
, dst_dev
)
2394 __field(int, src_stateid_seq
)
2395 __field(u32
, src_stateid_hash
)
2396 __field(int, dst_stateid_seq
)
2397 __field(u32
, dst_stateid_hash
)
2398 __field(loff_t
, src_offset
)
2399 __field(loff_t
, dst_offset
)
2401 __field(loff_t
, len
)
2402 __field(int, res_stateid_seq
)
2403 __field(u32
, res_stateid_hash
)
2404 __field(loff_t
, res_count
)
2405 __field(bool, res_sync
)
2406 __field(bool, res_cons
)
2407 __field(bool, intra
)
2411 const struct nfs_inode
*src_nfsi
= NFS_I(src_inode
);
2412 const struct nfs_inode
*dst_nfsi
= NFS_I(dst_inode
);
2414 __entry
->src_fileid
= src_nfsi
->fileid
;
2415 __entry
->src_dev
= src_inode
->i_sb
->s_dev
;
2416 __entry
->src_fhandle
= nfs_fhandle_hash(args
->src_fh
);
2417 __entry
->src_offset
= args
->src_pos
;
2418 __entry
->dst_fileid
= dst_nfsi
->fileid
;
2419 __entry
->dst_dev
= dst_inode
->i_sb
->s_dev
;
2420 __entry
->dst_fhandle
= nfs_fhandle_hash(args
->dst_fh
);
2421 __entry
->dst_offset
= args
->dst_pos
;
2422 __entry
->len
= args
->count
;
2423 __entry
->sync
= args
->sync
;
2424 __entry
->src_stateid_seq
=
2425 be32_to_cpu(args
->src_stateid
.seqid
);
2426 __entry
->src_stateid_hash
=
2427 nfs_stateid_hash(&args
->src_stateid
);
2428 __entry
->dst_stateid_seq
=
2429 be32_to_cpu(args
->dst_stateid
.seqid
);
2430 __entry
->dst_stateid_hash
=
2431 nfs_stateid_hash(&args
->dst_stateid
);
2432 __entry
->intra
= nss
? 0 : 1;
2434 __entry
->error
= -error
;
2435 __entry
->res_stateid_seq
= 0;
2436 __entry
->res_stateid_hash
= 0;
2437 __entry
->res_count
= 0;
2438 __entry
->res_sync
= 0;
2439 __entry
->res_cons
= 0;
2442 __entry
->res_stateid_seq
=
2443 be32_to_cpu(res
->write_res
.stateid
.seqid
);
2444 __entry
->res_stateid_hash
=
2445 nfs_stateid_hash(&res
->write_res
.stateid
);
2446 __entry
->res_count
= res
->write_res
.count
;
2447 __entry
->res_sync
= res
->synchronous
;
2448 __entry
->res_cons
= res
->consecutive
;
2453 "error=%ld (%s) intra=%d src_fileid=%02x:%02x:%llu "
2454 "src_fhandle=0x%08x dst_fileid=%02x:%02x:%llu "
2455 "dst_fhandle=0x%08x src_stateid=%d:0x%08x "
2456 "dst_stateid=%d:0x%08x src_offset=%llu dst_offset=%llu "
2457 "len=%llu sync=%d cb_stateid=%d:0x%08x res_sync=%d "
2458 "res_cons=%d res_count=%llu",
2460 show_nfs4_status(__entry
->error
),
2462 MAJOR(__entry
->src_dev
), MINOR(__entry
->src_dev
),
2463 (unsigned long long)__entry
->src_fileid
,
2464 __entry
->src_fhandle
,
2465 MAJOR(__entry
->dst_dev
), MINOR(__entry
->dst_dev
),
2466 (unsigned long long)__entry
->dst_fileid
,
2467 __entry
->dst_fhandle
,
2468 __entry
->src_stateid_seq
, __entry
->src_stateid_hash
,
2469 __entry
->dst_stateid_seq
, __entry
->dst_stateid_hash
,
2470 __entry
->src_offset
,
2471 __entry
->dst_offset
,
2474 __entry
->res_stateid_seq
, __entry
->res_stateid_hash
,
2481 TRACE_EVENT(nfs4_clone
,
2483 const struct inode
*src_inode
,
2484 const struct inode
*dst_inode
,
2485 const struct nfs42_clone_args
*args
,
2489 TP_ARGS(src_inode
, dst_inode
, args
, error
),
2492 __field(unsigned long, error
)
2493 __field(u32
, src_fhandle
)
2494 __field(u32
, src_fileid
)
2495 __field(u32
, dst_fhandle
)
2496 __field(u32
, dst_fileid
)
2497 __field(dev_t
, src_dev
)
2498 __field(dev_t
, dst_dev
)
2499 __field(loff_t
, src_offset
)
2500 __field(loff_t
, dst_offset
)
2501 __field(int, src_stateid_seq
)
2502 __field(u32
, src_stateid_hash
)
2503 __field(int, dst_stateid_seq
)
2504 __field(u32
, dst_stateid_hash
)
2505 __field(loff_t
, len
)
2509 const struct nfs_inode
*src_nfsi
= NFS_I(src_inode
);
2510 const struct nfs_inode
*dst_nfsi
= NFS_I(dst_inode
);
2512 __entry
->src_fileid
= src_nfsi
->fileid
;
2513 __entry
->src_dev
= src_inode
->i_sb
->s_dev
;
2514 __entry
->src_fhandle
= nfs_fhandle_hash(args
->src_fh
);
2515 __entry
->src_offset
= args
->src_offset
;
2516 __entry
->dst_fileid
= dst_nfsi
->fileid
;
2517 __entry
->dst_dev
= dst_inode
->i_sb
->s_dev
;
2518 __entry
->dst_fhandle
= nfs_fhandle_hash(args
->dst_fh
);
2519 __entry
->dst_offset
= args
->dst_offset
;
2520 __entry
->len
= args
->count
;
2521 __entry
->error
= error
< 0 ? -error
: 0;
2522 __entry
->src_stateid_seq
=
2523 be32_to_cpu(args
->src_stateid
.seqid
);
2524 __entry
->src_stateid_hash
=
2525 nfs_stateid_hash(&args
->src_stateid
);
2526 __entry
->dst_stateid_seq
=
2527 be32_to_cpu(args
->dst_stateid
.seqid
);
2528 __entry
->dst_stateid_hash
=
2529 nfs_stateid_hash(&args
->dst_stateid
);
2533 "error=%ld (%s) src_fileid=%02x:%02x:%llu "
2534 "src_fhandle=0x%08x dst_fileid=%02x:%02x:%llu "
2535 "dst_fhandle=0x%08x src_stateid=%d:0x%08x "
2536 "dst_stateid=%d:0x%08x src_offset=%llu "
2537 "dst_offset=%llu len=%llu",
2539 show_nfs4_status(__entry
->error
),
2540 MAJOR(__entry
->src_dev
), MINOR(__entry
->src_dev
),
2541 (unsigned long long)__entry
->src_fileid
,
2542 __entry
->src_fhandle
,
2543 MAJOR(__entry
->dst_dev
), MINOR(__entry
->dst_dev
),
2544 (unsigned long long)__entry
->dst_fileid
,
2545 __entry
->dst_fhandle
,
2546 __entry
->src_stateid_seq
, __entry
->src_stateid_hash
,
2547 __entry
->dst_stateid_seq
, __entry
->dst_stateid_hash
,
2548 __entry
->src_offset
,
2549 __entry
->dst_offset
,
2554 TRACE_EVENT(nfs4_copy_notify
,
2556 const struct inode
*inode
,
2557 const struct nfs42_copy_notify_args
*args
,
2558 const struct nfs42_copy_notify_res
*res
,
2562 TP_ARGS(inode
, args
, res
, error
),
2565 __field(unsigned long, error
)
2566 __field(u32
, fhandle
)
2567 __field(u32
, fileid
)
2569 __field(int, stateid_seq
)
2570 __field(u32
, stateid_hash
)
2571 __field(int, res_stateid_seq
)
2572 __field(u32
, res_stateid_hash
)
2576 const struct nfs_inode
*nfsi
= NFS_I(inode
);
2578 __entry
->fileid
= nfsi
->fileid
;
2579 __entry
->dev
= inode
->i_sb
->s_dev
;
2580 __entry
->fhandle
= nfs_fhandle_hash(args
->cna_src_fh
);
2581 __entry
->stateid_seq
=
2582 be32_to_cpu(args
->cna_src_stateid
.seqid
);
2583 __entry
->stateid_hash
=
2584 nfs_stateid_hash(&args
->cna_src_stateid
);
2586 __entry
->error
= -error
;
2587 __entry
->res_stateid_seq
= 0;
2588 __entry
->res_stateid_hash
= 0;
2591 __entry
->res_stateid_seq
=
2592 be32_to_cpu(res
->cnr_stateid
.seqid
);
2593 __entry
->res_stateid_hash
=
2594 nfs_stateid_hash(&res
->cnr_stateid
);
2599 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
2600 "stateid=%d:0x%08x res_stateid=%d:0x%08x",
2602 show_nfs4_status(__entry
->error
),
2603 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2604 (unsigned long long)__entry
->fileid
,
2606 __entry
->stateid_seq
, __entry
->stateid_hash
,
2607 __entry
->res_stateid_seq
, __entry
->res_stateid_hash
2611 TRACE_EVENT(nfs4_offload_cancel
,
2613 const struct nfs42_offload_status_args
*args
,
2617 TP_ARGS(args
, error
),
2620 __field(unsigned long, error
)
2621 __field(u32
, fhandle
)
2622 __field(int, stateid_seq
)
2623 __field(u32
, stateid_hash
)
2627 __entry
->fhandle
= nfs_fhandle_hash(args
->osa_src_fh
);
2628 __entry
->error
= error
< 0 ? -error
: 0;
2629 __entry
->stateid_seq
=
2630 be32_to_cpu(args
->osa_stateid
.seqid
);
2631 __entry
->stateid_hash
=
2632 nfs_stateid_hash(&args
->osa_stateid
);
2636 "error=%ld (%s) fhandle=0x%08x stateid=%d:0x%08x",
2638 show_nfs4_status(__entry
->error
),
2640 __entry
->stateid_seq
, __entry
->stateid_hash
2644 DECLARE_EVENT_CLASS(nfs4_xattr_event
,
2646 const struct inode
*inode
,
2651 TP_ARGS(inode
, name
, error
),
2654 __field(unsigned long, error
)
2656 __field(u32
, fhandle
)
2657 __field(u64
, fileid
)
2658 __string(name
, name
)
2662 __entry
->error
= error
< 0 ? -error
: 0;
2663 __entry
->dev
= inode
->i_sb
->s_dev
;
2664 __entry
->fileid
= NFS_FILEID(inode
);
2665 __entry
->fhandle
= nfs_fhandle_hash(NFS_FH(inode
));
2670 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
2672 -__entry
->error
, show_nfs4_status(__entry
->error
),
2673 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2674 (unsigned long long)__entry
->fileid
,
2675 __entry
->fhandle
, __get_str(name
)
2678 #define DEFINE_NFS4_XATTR_EVENT(name) \
2679 DEFINE_EVENT(nfs4_xattr_event, name, \
2681 const struct inode *inode, \
2685 TP_ARGS(inode, name, error))
2686 DEFINE_NFS4_XATTR_EVENT(nfs4_getxattr
);
2687 DEFINE_NFS4_XATTR_EVENT(nfs4_setxattr
);
2688 DEFINE_NFS4_XATTR_EVENT(nfs4_removexattr
);
2690 DEFINE_NFS4_INODE_EVENT(nfs4_listxattr
);
2691 #endif /* CONFIG_NFS_V4_2 */
2693 #endif /* CONFIG_NFS_V4_1 */
2695 #endif /* _TRACE_NFS4_H */
2697 #undef TRACE_INCLUDE_PATH
2698 #define TRACE_INCLUDE_PATH .
2699 #define TRACE_INCLUDE_FILE nfs4trace
2700 /* This part must be outside protection */
2701 #include <trace/define_trace.h>