@@ -784,6 +784,34 @@ TRACE_EVENT(nfsd_file_acquire,
784
784
__entry -> nf_file , __entry -> status )
785
785
);
786
786
787
+ TRACE_EVENT (nfsd_file_open ,
788
+ TP_PROTO (struct nfsd_file * nf , __be32 status ),
789
+ TP_ARGS (nf , status ),
790
+ TP_STRUCT__entry (
791
+ __field (unsigned int , nf_hashval )
792
+ __field (void * , nf_inode ) /* cannot be dereferenced */
793
+ __field (int , nf_ref )
794
+ __field (unsigned long , nf_flags )
795
+ __field (unsigned long , nf_may )
796
+ __field (void * , nf_file ) /* cannot be dereferenced */
797
+ ),
798
+ TP_fast_assign (
799
+ __entry -> nf_hashval = nf -> nf_hashval ;
800
+ __entry -> nf_inode = nf -> nf_inode ;
801
+ __entry -> nf_ref = refcount_read (& nf -> nf_ref );
802
+ __entry -> nf_flags = nf -> nf_flags ;
803
+ __entry -> nf_may = nf -> nf_may ;
804
+ __entry -> nf_file = nf -> nf_file ;
805
+ ),
806
+ TP_printk ("hash=0x%x inode=%p ref=%d flags=%s may=%s file=%p" ,
807
+ __entry -> nf_hashval ,
808
+ __entry -> nf_inode ,
809
+ __entry -> nf_ref ,
810
+ show_nf_flags (__entry -> nf_flags ),
811
+ show_nfsd_may_flags (__entry -> nf_may ),
812
+ __entry -> nf_file )
813
+ )
814
+
787
815
DECLARE_EVENT_CLASS (nfsd_file_search_class ,
788
816
TP_PROTO (struct inode * inode , unsigned int hash , int found ),
789
817
TP_ARGS (inode , hash , found ),
0 commit comments