1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2018, Microsoft Corporation.
5 * Author(s): Steve French <stfrench@microsoft.com>
8 #define TRACE_SYSTEM cifs
10 #if !defined(_CIFS_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
13 #include <linux/tracepoint.h>
15 /* For logging errors in read or write */
16 DECLARE_EVENT_CLASS(smb3_rw_err_class
,
17 TP_PROTO(unsigned int xid
,
24 TP_ARGS(xid
, fid
, tid
, sesid
, offset
, len
, rc
),
26 __field(unsigned int, xid
)
30 __field(__u64
, offset
)
38 __entry
->sesid
= sesid
;
39 __entry
->offset
= offset
;
43 TP_printk("\txid=%u sid=0x%llx tid=0x%x fid=0x%llx offset=0x%llx len=0x%x rc=%d",
44 __entry
->xid
, __entry
->sesid
, __entry
->tid
, __entry
->fid
,
45 __entry
->offset
, __entry
->len
, __entry
->rc
)
48 #define DEFINE_SMB3_RW_ERR_EVENT(name) \
49 DEFINE_EVENT(smb3_rw_err_class, smb3_##name, \
50 TP_PROTO(unsigned int xid, \
57 TP_ARGS(xid, fid, tid, sesid, offset, len, rc))
59 DEFINE_SMB3_RW_ERR_EVENT(write_err
);
60 DEFINE_SMB3_RW_ERR_EVENT(read_err
);
61 DEFINE_SMB3_RW_ERR_EVENT(query_dir_err
);
62 DEFINE_SMB3_RW_ERR_EVENT(zero_err
);
63 DEFINE_SMB3_RW_ERR_EVENT(falloc_err
);
66 /* For logging successful read or write */
67 DECLARE_EVENT_CLASS(smb3_rw_done_class
,
68 TP_PROTO(unsigned int xid
,
74 TP_ARGS(xid
, fid
, tid
, sesid
, offset
, len
),
76 __field(unsigned int, xid
)
80 __field(__u64
, offset
)
87 __entry
->sesid
= sesid
;
88 __entry
->offset
= offset
;
91 TP_printk("xid=%u sid=0x%llx tid=0x%x fid=0x%llx offset=0x%llx len=0x%x",
92 __entry
->xid
, __entry
->sesid
, __entry
->tid
, __entry
->fid
,
93 __entry
->offset
, __entry
->len
)
96 #define DEFINE_SMB3_RW_DONE_EVENT(name) \
97 DEFINE_EVENT(smb3_rw_done_class, smb3_##name, \
98 TP_PROTO(unsigned int xid, \
104 TP_ARGS(xid, fid, tid, sesid, offset, len))
106 DEFINE_SMB3_RW_DONE_EVENT(write_enter
);
107 DEFINE_SMB3_RW_DONE_EVENT(read_enter
);
108 DEFINE_SMB3_RW_DONE_EVENT(query_dir_enter
);
109 DEFINE_SMB3_RW_DONE_EVENT(zero_enter
);
110 DEFINE_SMB3_RW_DONE_EVENT(falloc_enter
);
111 DEFINE_SMB3_RW_DONE_EVENT(write_done
);
112 DEFINE_SMB3_RW_DONE_EVENT(read_done
);
113 DEFINE_SMB3_RW_DONE_EVENT(query_dir_done
);
114 DEFINE_SMB3_RW_DONE_EVENT(zero_done
);
115 DEFINE_SMB3_RW_DONE_EVENT(falloc_done
);
118 * For handle based calls other than read and write, and get/set info
120 DECLARE_EVENT_CLASS(smb3_fd_class
,
121 TP_PROTO(unsigned int xid
,
125 TP_ARGS(xid
, fid
, tid
, sesid
),
127 __field(unsigned int, xid
)
130 __field(__u64
, sesid
)
136 __entry
->sesid
= sesid
;
138 TP_printk("\txid=%u sid=0x%llx tid=0x%x fid=0x%llx",
139 __entry
->xid
, __entry
->sesid
, __entry
->tid
, __entry
->fid
)
142 #define DEFINE_SMB3_FD_EVENT(name) \
143 DEFINE_EVENT(smb3_fd_class, smb3_##name, \
144 TP_PROTO(unsigned int xid, \
148 TP_ARGS(xid, fid, tid, sesid))
150 DEFINE_SMB3_FD_EVENT(flush_enter
);
151 DEFINE_SMB3_FD_EVENT(flush_done
);
152 DEFINE_SMB3_FD_EVENT(close_enter
);
153 DEFINE_SMB3_FD_EVENT(close_done
);
155 DECLARE_EVENT_CLASS(smb3_fd_err_class
,
156 TP_PROTO(unsigned int xid
,
161 TP_ARGS(xid
, fid
, tid
, sesid
, rc
),
163 __field(unsigned int, xid
)
166 __field(__u64
, sesid
)
173 __entry
->sesid
= sesid
;
176 TP_printk("\txid=%u sid=0x%llx tid=0x%x fid=0x%llx rc=%d",
177 __entry
->xid
, __entry
->sesid
, __entry
->tid
, __entry
->fid
,
181 #define DEFINE_SMB3_FD_ERR_EVENT(name) \
182 DEFINE_EVENT(smb3_fd_err_class, smb3_##name, \
183 TP_PROTO(unsigned int xid, \
188 TP_ARGS(xid, fid, tid, sesid, rc))
190 DEFINE_SMB3_FD_ERR_EVENT(flush_err
);
191 DEFINE_SMB3_FD_ERR_EVENT(lock_err
);
192 DEFINE_SMB3_FD_ERR_EVENT(close_err
);
195 * For handle based query/set info calls
197 DECLARE_EVENT_CLASS(smb3_inf_enter_class
,
198 TP_PROTO(unsigned int xid
,
204 TP_ARGS(xid
, fid
, tid
, sesid
, infclass
, type
),
206 __field(unsigned int, xid
)
209 __field(__u64
, sesid
)
210 __field(__u8
, infclass
)
217 __entry
->sesid
= sesid
;
218 __entry
->infclass
= infclass
;
219 __entry
->type
= type
;
221 TP_printk("xid=%u sid=0x%llx tid=0x%x fid=0x%llx class=%u type=0x%x",
222 __entry
->xid
, __entry
->sesid
, __entry
->tid
, __entry
->fid
,
223 __entry
->infclass
, __entry
->type
)
226 #define DEFINE_SMB3_INF_ENTER_EVENT(name) \
227 DEFINE_EVENT(smb3_inf_enter_class, smb3_##name, \
228 TP_PROTO(unsigned int xid, \
234 TP_ARGS(xid, fid, tid, sesid, infclass, type))
236 DEFINE_SMB3_INF_ENTER_EVENT(query_info_enter
);
237 DEFINE_SMB3_INF_ENTER_EVENT(query_info_done
);
238 DEFINE_SMB3_INF_ENTER_EVENT(notify_enter
);
239 DEFINE_SMB3_INF_ENTER_EVENT(notify_done
);
241 DECLARE_EVENT_CLASS(smb3_inf_err_class
,
242 TP_PROTO(unsigned int xid
,
249 TP_ARGS(xid
, fid
, tid
, sesid
, infclass
, type
, rc
),
251 __field(unsigned int, xid
)
254 __field(__u64
, sesid
)
255 __field(__u8
, infclass
)
263 __entry
->sesid
= sesid
;
264 __entry
->infclass
= infclass
;
265 __entry
->type
= type
;
268 TP_printk("xid=%u sid=0x%llx tid=0x%x fid=0x%llx class=%u type=0x%x rc=%d",
269 __entry
->xid
, __entry
->sesid
, __entry
->tid
, __entry
->fid
,
270 __entry
->infclass
, __entry
->type
, __entry
->rc
)
273 #define DEFINE_SMB3_INF_ERR_EVENT(name) \
274 DEFINE_EVENT(smb3_inf_err_class, smb3_##name, \
275 TP_PROTO(unsigned int xid, \
282 TP_ARGS(xid, fid, tid, sesid, infclass, type, rc))
284 DEFINE_SMB3_INF_ERR_EVENT(query_info_err
);
285 DEFINE_SMB3_INF_ERR_EVENT(set_info_err
);
286 DEFINE_SMB3_INF_ERR_EVENT(notify_err
);
287 DEFINE_SMB3_INF_ERR_EVENT(fsctl_err
);
289 DECLARE_EVENT_CLASS(smb3_inf_compound_enter_class
,
290 TP_PROTO(unsigned int xid
,
293 const char *full_path
),
294 TP_ARGS(xid
, tid
, sesid
, full_path
),
296 __field(unsigned int, xid
)
298 __field(__u64
, sesid
)
299 __string(path
, full_path
)
304 __entry
->sesid
= sesid
;
305 __assign_str(path
, full_path
);
307 TP_printk("xid=%u sid=0x%llx tid=0x%x path=%s",
308 __entry
->xid
, __entry
->sesid
, __entry
->tid
,
312 #define DEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(name) \
313 DEFINE_EVENT(smb3_inf_compound_enter_class, smb3_##name, \
314 TP_PROTO(unsigned int xid, \
317 const char *full_path), \
318 TP_ARGS(xid, tid, sesid, full_path))
320 DEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(query_info_compound_enter
);
321 DEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(hardlink_enter
);
322 DEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(rename_enter
);
323 DEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(rmdir_enter
);
324 DEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(set_eof_enter
);
325 DEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(set_info_compound_enter
);
326 DEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(delete_enter
);
327 DEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(mkdir_enter
);
330 DECLARE_EVENT_CLASS(smb3_inf_compound_done_class
,
331 TP_PROTO(unsigned int xid
,
334 TP_ARGS(xid
, tid
, sesid
),
336 __field(unsigned int, xid
)
338 __field(__u64
, sesid
)
343 __entry
->sesid
= sesid
;
345 TP_printk("xid=%u sid=0x%llx tid=0x%x",
346 __entry
->xid
, __entry
->sesid
, __entry
->tid
)
349 #define DEFINE_SMB3_INF_COMPOUND_DONE_EVENT(name) \
350 DEFINE_EVENT(smb3_inf_compound_done_class, smb3_##name, \
351 TP_PROTO(unsigned int xid, \
354 TP_ARGS(xid, tid, sesid))
356 DEFINE_SMB3_INF_COMPOUND_DONE_EVENT(query_info_compound_done
);
357 DEFINE_SMB3_INF_COMPOUND_DONE_EVENT(hardlink_done
);
358 DEFINE_SMB3_INF_COMPOUND_DONE_EVENT(rename_done
);
359 DEFINE_SMB3_INF_COMPOUND_DONE_EVENT(rmdir_done
);
360 DEFINE_SMB3_INF_COMPOUND_DONE_EVENT(set_eof_done
);
361 DEFINE_SMB3_INF_COMPOUND_DONE_EVENT(set_info_compound_done
);
362 DEFINE_SMB3_INF_COMPOUND_DONE_EVENT(delete_done
);
363 DEFINE_SMB3_INF_COMPOUND_DONE_EVENT(mkdir_done
);
366 DECLARE_EVENT_CLASS(smb3_inf_compound_err_class
,
367 TP_PROTO(unsigned int xid
,
371 TP_ARGS(xid
, tid
, sesid
, rc
),
373 __field(unsigned int, xid
)
375 __field(__u64
, sesid
)
381 __entry
->sesid
= sesid
;
384 TP_printk("xid=%u sid=0x%llx tid=0x%x rc=%d",
385 __entry
->xid
, __entry
->sesid
, __entry
->tid
,
389 #define DEFINE_SMB3_INF_COMPOUND_ERR_EVENT(name) \
390 DEFINE_EVENT(smb3_inf_compound_err_class, smb3_##name, \
391 TP_PROTO(unsigned int xid, \
395 TP_ARGS(xid, tid, sesid, rc))
397 DEFINE_SMB3_INF_COMPOUND_ERR_EVENT(query_info_compound_err
);
398 DEFINE_SMB3_INF_COMPOUND_ERR_EVENT(hardlink_err
);
399 DEFINE_SMB3_INF_COMPOUND_ERR_EVENT(rename_err
);
400 DEFINE_SMB3_INF_COMPOUND_ERR_EVENT(rmdir_err
);
401 DEFINE_SMB3_INF_COMPOUND_ERR_EVENT(set_eof_err
);
402 DEFINE_SMB3_INF_COMPOUND_ERR_EVENT(set_info_compound_err
);
403 DEFINE_SMB3_INF_COMPOUND_ERR_EVENT(mkdir_err
);
404 DEFINE_SMB3_INF_COMPOUND_ERR_EVENT(delete_err
);
407 * For logging SMB3 Status code and Command for responses which return errors
409 DECLARE_EVENT_CLASS(smb3_cmd_err_class
,
416 TP_ARGS(tid
, sesid
, cmd
, mid
, status
, rc
),
419 __field(__u64
, sesid
)
422 __field(__u32
, status
)
427 __entry
->sesid
= sesid
;
430 __entry
->status
= status
;
433 TP_printk("\tsid=0x%llx tid=0x%x cmd=%u mid=%llu status=0x%x rc=%d",
434 __entry
->sesid
, __entry
->tid
, __entry
->cmd
, __entry
->mid
,
435 __entry
->status
, __entry
->rc
)
438 #define DEFINE_SMB3_CMD_ERR_EVENT(name) \
439 DEFINE_EVENT(smb3_cmd_err_class, smb3_##name, \
440 TP_PROTO(__u32 tid, \
446 TP_ARGS(tid, sesid, cmd, mid, status, rc))
448 DEFINE_SMB3_CMD_ERR_EVENT(cmd_err
);
450 DECLARE_EVENT_CLASS(smb3_cmd_done_class
,
455 TP_ARGS(tid
, sesid
, cmd
, mid
),
458 __field(__u64
, sesid
)
464 __entry
->sesid
= sesid
;
468 TP_printk("\tsid=0x%llx tid=0x%x cmd=%u mid=%llu",
469 __entry
->sesid
, __entry
->tid
,
470 __entry
->cmd
, __entry
->mid
)
473 #define DEFINE_SMB3_CMD_DONE_EVENT(name) \
474 DEFINE_EVENT(smb3_cmd_done_class, smb3_##name, \
475 TP_PROTO(__u32 tid, \
479 TP_ARGS(tid, sesid, cmd, mid))
481 DEFINE_SMB3_CMD_DONE_EVENT(cmd_enter
);
482 DEFINE_SMB3_CMD_DONE_EVENT(cmd_done
);
483 DEFINE_SMB3_CMD_DONE_EVENT(ses_expired
);
485 DECLARE_EVENT_CLASS(smb3_mid_class
,
489 unsigned long when_sent
,
490 unsigned long when_received
),
491 TP_ARGS(cmd
, mid
, pid
, when_sent
, when_received
),
496 __field(unsigned long, when_sent
)
497 __field(unsigned long, when_received
)
503 __entry
->when_sent
= when_sent
;
504 __entry
->when_received
= when_received
;
506 TP_printk("\tcmd=%u mid=%llu pid=%u, when_sent=%lu when_rcv=%lu",
507 __entry
->cmd
, __entry
->mid
, __entry
->pid
, __entry
->when_sent
,
508 __entry
->when_received
)
511 #define DEFINE_SMB3_MID_EVENT(name) \
512 DEFINE_EVENT(smb3_mid_class, smb3_##name, \
513 TP_PROTO(__u16 cmd, \
516 unsigned long when_sent, \
517 unsigned long when_received), \
518 TP_ARGS(cmd, mid, pid, when_sent, when_received))
520 DEFINE_SMB3_MID_EVENT(slow_rsp
);
522 DECLARE_EVENT_CLASS(smb3_exit_err_class
,
523 TP_PROTO(unsigned int xid
,
524 const char *func_name
,
526 TP_ARGS(xid
, func_name
, rc
),
528 __field(unsigned int, xid
)
529 __field(const char *, func_name
)
534 __entry
->func_name
= func_name
;
537 TP_printk("\t%s: xid=%u rc=%d",
538 __entry
->func_name
, __entry
->xid
, __entry
->rc
)
541 #define DEFINE_SMB3_EXIT_ERR_EVENT(name) \
542 DEFINE_EVENT(smb3_exit_err_class, smb3_##name, \
543 TP_PROTO(unsigned int xid, \
544 const char *func_name, \
546 TP_ARGS(xid, func_name, rc))
548 DEFINE_SMB3_EXIT_ERR_EVENT(exit_err
);
550 DECLARE_EVENT_CLASS(smb3_enter_exit_class
,
551 TP_PROTO(unsigned int xid
,
552 const char *func_name
),
553 TP_ARGS(xid
, func_name
),
555 __field(unsigned int, xid
)
556 __field(const char *, func_name
)
560 __entry
->func_name
= func_name
;
562 TP_printk("\t%s: xid=%u",
563 __entry
->func_name
, __entry
->xid
)
566 #define DEFINE_SMB3_ENTER_EXIT_EVENT(name) \
567 DEFINE_EVENT(smb3_enter_exit_class, smb3_##name, \
568 TP_PROTO(unsigned int xid, \
569 const char *func_name), \
570 TP_ARGS(xid, func_name))
572 DEFINE_SMB3_ENTER_EXIT_EVENT(enter
);
573 DEFINE_SMB3_ENTER_EXIT_EVENT(exit_done
);
576 * For SMB2/SMB3 tree connect
579 DECLARE_EVENT_CLASS(smb3_tcon_class
,
580 TP_PROTO(unsigned int xid
,
583 const char *unc_name
,
585 TP_ARGS(xid
, tid
, sesid
, unc_name
, rc
),
587 __field(unsigned int, xid
)
589 __field(__u64
, sesid
)
590 __string(name
, unc_name
)
596 __entry
->sesid
= sesid
;
597 __assign_str(name
, unc_name
);
600 TP_printk("xid=%u sid=0x%llx tid=0x%x unc_name=%s rc=%d",
601 __entry
->xid
, __entry
->sesid
, __entry
->tid
,
602 __get_str(name
), __entry
->rc
)
605 #define DEFINE_SMB3_TCON_EVENT(name) \
606 DEFINE_EVENT(smb3_tcon_class, smb3_##name, \
607 TP_PROTO(unsigned int xid, \
610 const char *unc_name, \
612 TP_ARGS(xid, tid, sesid, unc_name, rc))
614 DEFINE_SMB3_TCON_EVENT(tcon
);
618 * For smb2/smb3 open (including create and mkdir) calls
621 DECLARE_EVENT_CLASS(smb3_open_enter_class
,
622 TP_PROTO(unsigned int xid
,
627 TP_ARGS(xid
, tid
, sesid
, create_options
, desired_access
),
629 __field(unsigned int, xid
)
631 __field(__u64
, sesid
)
632 __field(int, create_options
)
633 __field(int, desired_access
)
638 __entry
->sesid
= sesid
;
639 __entry
->create_options
= create_options
;
640 __entry
->desired_access
= desired_access
;
642 TP_printk("xid=%u sid=0x%llx tid=0x%x cr_opts=0x%x des_access=0x%x",
643 __entry
->xid
, __entry
->sesid
, __entry
->tid
,
644 __entry
->create_options
, __entry
->desired_access
)
647 #define DEFINE_SMB3_OPEN_ENTER_EVENT(name) \
648 DEFINE_EVENT(smb3_open_enter_class, smb3_##name, \
649 TP_PROTO(unsigned int xid, \
652 int create_options, \
653 int desired_access), \
654 TP_ARGS(xid, tid, sesid, create_options, desired_access))
656 DEFINE_SMB3_OPEN_ENTER_EVENT(open_enter
);
657 DEFINE_SMB3_OPEN_ENTER_EVENT(posix_mkdir_enter
);
659 DECLARE_EVENT_CLASS(smb3_open_err_class
,
660 TP_PROTO(unsigned int xid
,
666 TP_ARGS(xid
, tid
, sesid
, create_options
, desired_access
, rc
),
668 __field(unsigned int, xid
)
670 __field(__u64
, sesid
)
671 __field(int, create_options
)
672 __field(int, desired_access
)
678 __entry
->sesid
= sesid
;
679 __entry
->create_options
= create_options
;
680 __entry
->desired_access
= desired_access
;
683 TP_printk("xid=%u sid=0x%llx tid=0x%x cr_opts=0x%x des_access=0x%x rc=%d",
684 __entry
->xid
, __entry
->sesid
, __entry
->tid
,
685 __entry
->create_options
, __entry
->desired_access
, __entry
->rc
)
688 #define DEFINE_SMB3_OPEN_ERR_EVENT(name) \
689 DEFINE_EVENT(smb3_open_err_class, smb3_##name, \
690 TP_PROTO(unsigned int xid, \
693 int create_options, \
694 int desired_access, \
696 TP_ARGS(xid, tid, sesid, create_options, desired_access, rc))
698 DEFINE_SMB3_OPEN_ERR_EVENT(open_err
);
699 DEFINE_SMB3_OPEN_ERR_EVENT(posix_mkdir_err
);
701 DECLARE_EVENT_CLASS(smb3_open_done_class
,
702 TP_PROTO(unsigned int xid
,
708 TP_ARGS(xid
, fid
, tid
, sesid
, create_options
, desired_access
),
710 __field(unsigned int, xid
)
713 __field(__u64
, sesid
)
714 __field(int, create_options
)
715 __field(int, desired_access
)
721 __entry
->sesid
= sesid
;
722 __entry
->create_options
= create_options
;
723 __entry
->desired_access
= desired_access
;
725 TP_printk("xid=%u sid=0x%llx tid=0x%x fid=0x%llx cr_opts=0x%x des_access=0x%x",
726 __entry
->xid
, __entry
->sesid
, __entry
->tid
, __entry
->fid
,
727 __entry
->create_options
, __entry
->desired_access
)
730 #define DEFINE_SMB3_OPEN_DONE_EVENT(name) \
731 DEFINE_EVENT(smb3_open_done_class, smb3_##name, \
732 TP_PROTO(unsigned int xid, \
736 int create_options, \
737 int desired_access), \
738 TP_ARGS(xid, fid, tid, sesid, create_options, desired_access))
740 DEFINE_SMB3_OPEN_DONE_EVENT(open_done
);
741 DEFINE_SMB3_OPEN_DONE_EVENT(posix_mkdir_done
);
744 DECLARE_EVENT_CLASS(smb3_lease_done_class
,
745 TP_PROTO(__u32 lease_state
,
749 __u64 lease_key_high
),
750 TP_ARGS(lease_state
, tid
, sesid
, lease_key_low
, lease_key_high
),
752 __field(__u32
, lease_state
)
754 __field(__u64
, sesid
)
755 __field(__u64
, lease_key_low
)
756 __field(__u64
, lease_key_high
)
759 __entry
->lease_state
= lease_state
;
761 __entry
->sesid
= sesid
;
762 __entry
->lease_key_low
= lease_key_low
;
763 __entry
->lease_key_high
= lease_key_high
;
765 TP_printk("sid=0x%llx tid=0x%x lease_key=0x%llx%llx lease_state=0x%x",
766 __entry
->sesid
, __entry
->tid
, __entry
->lease_key_high
,
767 __entry
->lease_key_low
, __entry
->lease_state
)
770 #define DEFINE_SMB3_LEASE_DONE_EVENT(name) \
771 DEFINE_EVENT(smb3_lease_done_class, smb3_##name, \
772 TP_PROTO(__u32 lease_state, \
775 __u64 lease_key_low, \
776 __u64 lease_key_high), \
777 TP_ARGS(lease_state, tid, sesid, lease_key_low, lease_key_high))
779 DEFINE_SMB3_LEASE_DONE_EVENT(lease_done
);
781 DECLARE_EVENT_CLASS(smb3_lease_err_class
,
782 TP_PROTO(__u32 lease_state
,
786 __u64 lease_key_high
,
788 TP_ARGS(lease_state
, tid
, sesid
, lease_key_low
, lease_key_high
, rc
),
790 __field(__u32
, lease_state
)
792 __field(__u64
, sesid
)
793 __field(__u64
, lease_key_low
)
794 __field(__u64
, lease_key_high
)
798 __entry
->lease_state
= lease_state
;
800 __entry
->sesid
= sesid
;
801 __entry
->lease_key_low
= lease_key_low
;
802 __entry
->lease_key_high
= lease_key_high
;
805 TP_printk("sid=0x%llx tid=0x%x lease_key=0x%llx%llx lease_state=0x%x rc=%d",
806 __entry
->sesid
, __entry
->tid
, __entry
->lease_key_high
,
807 __entry
->lease_key_low
, __entry
->lease_state
, __entry
->rc
)
810 #define DEFINE_SMB3_LEASE_ERR_EVENT(name) \
811 DEFINE_EVENT(smb3_lease_err_class, smb3_##name, \
812 TP_PROTO(__u32 lease_state, \
815 __u64 lease_key_low, \
816 __u64 lease_key_high, \
818 TP_ARGS(lease_state, tid, sesid, lease_key_low, lease_key_high, rc))
820 DEFINE_SMB3_LEASE_ERR_EVENT(lease_err
);
822 DECLARE_EVENT_CLASS(smb3_reconnect_class
,
823 TP_PROTO(__u64 currmid
,
825 TP_ARGS(currmid
, hostname
),
827 __field(__u64
, currmid
)
828 __field(char *, hostname
)
831 __entry
->currmid
= currmid
;
832 __entry
->hostname
= hostname
;
834 TP_printk("server=%s current_mid=0x%llx",
839 #define DEFINE_SMB3_RECONNECT_EVENT(name) \
840 DEFINE_EVENT(smb3_reconnect_class, smb3_##name, \
841 TP_PROTO(__u64 currmid, \
843 TP_ARGS(currmid, hostname))
845 DEFINE_SMB3_RECONNECT_EVENT(reconnect
);
846 DEFINE_SMB3_RECONNECT_EVENT(partial_send_reconnect
);
848 DECLARE_EVENT_CLASS(smb3_credit_class
,
849 TP_PROTO(__u64 currmid
,
852 TP_ARGS(currmid
, hostname
, credits
),
854 __field(__u64
, currmid
)
855 __field(char *, hostname
)
856 __field(int, credits
)
859 __entry
->currmid
= currmid
;
860 __entry
->hostname
= hostname
;
861 __entry
->credits
= credits
;
863 TP_printk("server=%s current_mid=0x%llx credits=%d",
869 #define DEFINE_SMB3_CREDIT_EVENT(name) \
870 DEFINE_EVENT(smb3_credit_class, smb3_##name, \
871 TP_PROTO(__u64 currmid, \
874 TP_ARGS(currmid, hostname, credits))
876 DEFINE_SMB3_CREDIT_EVENT(reconnect_with_invalid_credits
);
877 DEFINE_SMB3_CREDIT_EVENT(credit_timeout
);
879 #endif /* _CIFS_TRACE_H */
881 #undef TRACE_INCLUDE_PATH
882 #define TRACE_INCLUDE_PATH .
883 #define TRACE_INCLUDE_FILE trace
884 #include <trace/define_trace.h>