@@ -2051,13 +2051,15 @@ TRACE_EVENT(fl_getdevinfo,
2051
2051
2052
2052
DECLARE_EVENT_CLASS (nfs4_flexfiles_io_event ,
2053
2053
TP_PROTO (
2054
- const struct nfs_pgio_header * hdr
2054
+ const struct nfs_pgio_header * hdr ,
2055
+ int error
2055
2056
),
2056
2057
2057
- TP_ARGS (hdr ),
2058
+ TP_ARGS (hdr , error ),
2058
2059
2059
2060
TP_STRUCT__entry (
2060
2061
__field (unsigned long , error )
2062
+ __field (unsigned long , nfs_error )
2061
2063
__field (dev_t , dev )
2062
2064
__field (u32 , fhandle )
2063
2065
__field (u64 , fileid )
@@ -2073,7 +2075,8 @@ DECLARE_EVENT_CLASS(nfs4_flexfiles_io_event,
2073
2075
TP_fast_assign (
2074
2076
const struct inode * inode = hdr -> inode ;
2075
2077
2076
- __entry -> error = hdr -> res .op_status ;
2078
+ __entry -> error = - error ;
2079
+ __entry -> nfs_error = hdr -> res .op_status ;
2077
2080
__entry -> fhandle = nfs_fhandle_hash (hdr -> args .fh );
2078
2081
__entry -> fileid = NFS_FILEID (inode );
2079
2082
__entry -> dev = inode -> i_sb -> s_dev ;
@@ -2088,36 +2091,41 @@ DECLARE_EVENT_CLASS(nfs4_flexfiles_io_event,
2088
2091
2089
2092
TP_printk (
2090
2093
"error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
2091
- "offset=%llu count=%u stateid=%d:0x%08x dstaddr=%s" ,
2094
+ "offset=%llu count=%u stateid=%d:0x%08x dstaddr=%s "
2095
+ "nfs_error=%lu (%s)" ,
2092
2096
- __entry -> error ,
2093
2097
show_nfs4_status (__entry -> error ),
2094
2098
MAJOR (__entry -> dev ), MINOR (__entry -> dev ),
2095
2099
(unsigned long long )__entry -> fileid ,
2096
2100
__entry -> fhandle ,
2097
2101
__entry -> offset , __entry -> count ,
2098
2102
__entry -> stateid_seq , __entry -> stateid_hash ,
2099
- __get_str (dstaddr )
2103
+ __get_str (dstaddr ), __entry -> nfs_error ,
2104
+ show_nfs4_status (__entry -> nfs_error )
2100
2105
)
2101
2106
);
2102
2107
2103
2108
#define DEFINE_NFS4_FLEXFILES_IO_EVENT (name ) \
2104
2109
DEFINE_EVENT(nfs4_flexfiles_io_event, name, \
2105
2110
TP_PROTO( \
2106
- const struct nfs_pgio_header *hdr \
2111
+ const struct nfs_pgio_header *hdr, \
2112
+ int error \
2107
2113
), \
2108
- TP_ARGS(hdr))
2114
+ TP_ARGS(hdr, error ))
2109
2115
DEFINE_NFS4_FLEXFILES_IO_EVENT (ff_layout_read_error );
2110
2116
DEFINE_NFS4_FLEXFILES_IO_EVENT (ff_layout_write_error );
2111
2117
2112
2118
TRACE_EVENT (ff_layout_commit_error ,
2113
2119
TP_PROTO (
2114
- const struct nfs_commit_data * data
2120
+ const struct nfs_commit_data * data ,
2121
+ int error
2115
2122
),
2116
2123
2117
- TP_ARGS (data ),
2124
+ TP_ARGS (data , error ),
2118
2125
2119
2126
TP_STRUCT__entry (
2120
2127
__field (unsigned long , error )
2128
+ __field (unsigned long , nfs_error )
2121
2129
__field (dev_t , dev )
2122
2130
__field (u32 , fhandle )
2123
2131
__field (u64 , fileid )
@@ -2131,7 +2139,8 @@ TRACE_EVENT(ff_layout_commit_error,
2131
2139
TP_fast_assign (
2132
2140
const struct inode * inode = data -> inode ;
2133
2141
2134
- __entry -> error = data -> res .op_status ;
2142
+ __entry -> error = - error ;
2143
+ __entry -> nfs_error = data -> res .op_status ;
2135
2144
__entry -> fhandle = nfs_fhandle_hash (data -> args .fh );
2136
2145
__entry -> fileid = NFS_FILEID (inode );
2137
2146
__entry -> dev = inode -> i_sb -> s_dev ;
@@ -2142,14 +2151,15 @@ TRACE_EVENT(ff_layout_commit_error,
2142
2151
2143
2152
TP_printk (
2144
2153
"error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
2145
- "offset=%llu count=%u dstaddr=%s" ,
2154
+ "offset=%llu count=%u dstaddr=%s nfs_error=%lu (%s) " ,
2146
2155
- __entry -> error ,
2147
2156
show_nfs4_status (__entry -> error ),
2148
2157
MAJOR (__entry -> dev ), MINOR (__entry -> dev ),
2149
2158
(unsigned long long )__entry -> fileid ,
2150
2159
__entry -> fhandle ,
2151
2160
__entry -> offset , __entry -> count ,
2152
- __get_str (dstaddr )
2161
+ __get_str (dstaddr ), __entry -> nfs_error ,
2162
+ show_nfs4_status (__entry -> nfs_error )
2153
2163
)
2154
2164
);
2155
2165
0 commit comments