1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Display helpers for NFS protocol elements 4 * 5 * Author: Chuck Lever <chuck.lever@oracle.com> 6 * 7 * Copyright (c) 2020, Oracle and/or its affiliates. 8 */ 9 10 #include <linux/nfs.h> 11 #include <linux/nfs4.h> 12 #include <uapi/linux/nfs.h> 13 14 TRACE_DEFINE_ENUM(NFS_OK); 15 TRACE_DEFINE_ENUM(NFSERR_PERM); 16 TRACE_DEFINE_ENUM(NFSERR_NOENT); 17 TRACE_DEFINE_ENUM(NFSERR_IO); 18 TRACE_DEFINE_ENUM(NFSERR_NXIO); 19 TRACE_DEFINE_ENUM(NFSERR_EAGAIN); 20 TRACE_DEFINE_ENUM(NFSERR_ACCES); 21 TRACE_DEFINE_ENUM(NFSERR_EXIST); 22 TRACE_DEFINE_ENUM(NFSERR_XDEV); 23 TRACE_DEFINE_ENUM(NFSERR_NODEV); 24 TRACE_DEFINE_ENUM(NFSERR_NOTDIR); 25 TRACE_DEFINE_ENUM(NFSERR_ISDIR); 26 TRACE_DEFINE_ENUM(NFSERR_INVAL); 27 TRACE_DEFINE_ENUM(NFSERR_FBIG); 28 TRACE_DEFINE_ENUM(NFSERR_NOSPC); 29 TRACE_DEFINE_ENUM(NFSERR_ROFS); 30 TRACE_DEFINE_ENUM(NFSERR_MLINK); 31 TRACE_DEFINE_ENUM(NFSERR_NAMETOOLONG); 32 TRACE_DEFINE_ENUM(NFSERR_NOTEMPTY); 33 TRACE_DEFINE_ENUM(NFSERR_DQUOT); 34 TRACE_DEFINE_ENUM(NFSERR_STALE); 35 TRACE_DEFINE_ENUM(NFSERR_REMOTE); 36 TRACE_DEFINE_ENUM(NFSERR_WFLUSH); 37 TRACE_DEFINE_ENUM(NFSERR_BADHANDLE); 38 TRACE_DEFINE_ENUM(NFSERR_NOT_SYNC); 39 TRACE_DEFINE_ENUM(NFSERR_BAD_COOKIE); 40 TRACE_DEFINE_ENUM(NFSERR_NOTSUPP); 41 TRACE_DEFINE_ENUM(NFSERR_TOOSMALL); 42 TRACE_DEFINE_ENUM(NFSERR_SERVERFAULT); 43 TRACE_DEFINE_ENUM(NFSERR_BADTYPE); 44 TRACE_DEFINE_ENUM(NFSERR_JUKEBOX); 45 46 #define show_nfs_status(x) \ 47 __print_symbolic(x, \ 48 { NFS_OK, "OK" }, \ 49 { NFSERR_PERM, "PERM" }, \ 50 { NFSERR_NOENT, "NOENT" }, \ 51 { NFSERR_IO, "IO" }, \ 52 { NFSERR_NXIO, "NXIO" }, \ 53 { ECHILD, "CHILD" }, \ 54 { ETIMEDOUT, "TIMEDOUT" }, \ 55 { NFSERR_EAGAIN, "AGAIN" }, \ 56 { NFSERR_ACCES, "ACCES" }, \ 57 { NFSERR_EXIST, "EXIST" }, \ 58 { NFSERR_XDEV, "XDEV" }, \ 59 { NFSERR_NODEV, "NODEV" }, \ 60 { NFSERR_NOTDIR, "NOTDIR" }, \ 61 { NFSERR_ISDIR, "ISDIR" }, \ 62 { NFSERR_INVAL, "INVAL" }, \ 63 { NFSERR_FBIG, "FBIG" }, \ 64 { NFSERR_NOSPC, "NOSPC" }, \ 65 { NFSERR_ROFS, "ROFS" }, \ 66 { NFSERR_MLINK, "MLINK" }, \ 67 { NFSERR_NAMETOOLONG, "NAMETOOLONG" }, \ 68 { NFSERR_NOTEMPTY, "NOTEMPTY" }, \ 69 { NFSERR_DQUOT, "DQUOT" }, \ 70 { NFSERR_STALE, "STALE" }, \ 71 { NFSERR_REMOTE, "REMOTE" }, \ 72 { NFSERR_WFLUSH, "WFLUSH" }, \ 73 { NFSERR_BADHANDLE, "BADHANDLE" }, \ 74 { NFSERR_NOT_SYNC, "NOTSYNC" }, \ 75 { NFSERR_BAD_COOKIE, "BADCOOKIE" }, \ 76 { NFSERR_NOTSUPP, "NOTSUPP" }, \ 77 { NFSERR_TOOSMALL, "TOOSMALL" }, \ 78 { NFSERR_SERVERFAULT, "REMOTEIO" }, \ 79 { NFSERR_BADTYPE, "BADTYPE" }, \ 80 { NFSERR_JUKEBOX, "JUKEBOX" }) 81 82 TRACE_DEFINE_ENUM(NFS_UNSTABLE); 83 TRACE_DEFINE_ENUM(NFS_DATA_SYNC); 84 TRACE_DEFINE_ENUM(NFS_FILE_SYNC); 85 86 #define show_nfs_stable_how(x) \ 87 __print_symbolic(x, \ 88 { NFS_UNSTABLE, "UNSTABLE" }, \ 89 { NFS_DATA_SYNC, "DATA_SYNC" }, \ 90 { NFS_FILE_SYNC, "FILE_SYNC" }) 91 92 TRACE_DEFINE_ENUM(NFS4_OK); 93 TRACE_DEFINE_ENUM(NFS4ERR_ACCESS); 94 TRACE_DEFINE_ENUM(NFS4ERR_ATTRNOTSUPP); 95 TRACE_DEFINE_ENUM(NFS4ERR_ADMIN_REVOKED); 96 TRACE_DEFINE_ENUM(NFS4ERR_BACK_CHAN_BUSY); 97 TRACE_DEFINE_ENUM(NFS4ERR_BADCHAR); 98 TRACE_DEFINE_ENUM(NFS4ERR_BADHANDLE); 99 TRACE_DEFINE_ENUM(NFS4ERR_BADIOMODE); 100 TRACE_DEFINE_ENUM(NFS4ERR_BADLAYOUT); 101 TRACE_DEFINE_ENUM(NFS4ERR_BADLABEL); 102 TRACE_DEFINE_ENUM(NFS4ERR_BADNAME); 103 TRACE_DEFINE_ENUM(NFS4ERR_BADOWNER); 104 TRACE_DEFINE_ENUM(NFS4ERR_BADSESSION); 105 TRACE_DEFINE_ENUM(NFS4ERR_BADSLOT); 106 TRACE_DEFINE_ENUM(NFS4ERR_BADTYPE); 107 TRACE_DEFINE_ENUM(NFS4ERR_BADXDR); 108 TRACE_DEFINE_ENUM(NFS4ERR_BAD_COOKIE); 109 TRACE_DEFINE_ENUM(NFS4ERR_BAD_HIGH_SLOT); 110 TRACE_DEFINE_ENUM(NFS4ERR_BAD_RANGE); 111 TRACE_DEFINE_ENUM(NFS4ERR_BAD_SEQID); 112 TRACE_DEFINE_ENUM(NFS4ERR_BAD_SESSION_DIGEST); 113 TRACE_DEFINE_ENUM(NFS4ERR_BAD_STATEID); 114 TRACE_DEFINE_ENUM(NFS4ERR_CB_PATH_DOWN); 115 TRACE_DEFINE_ENUM(NFS4ERR_CLID_INUSE); 116 TRACE_DEFINE_ENUM(NFS4ERR_CLIENTID_BUSY); 117 TRACE_DEFINE_ENUM(NFS4ERR_COMPLETE_ALREADY); 118 TRACE_DEFINE_ENUM(NFS4ERR_CONN_NOT_BOUND_TO_SESSION); 119 TRACE_DEFINE_ENUM(NFS4ERR_DEADLOCK); 120 TRACE_DEFINE_ENUM(NFS4ERR_DEADSESSION); 121 TRACE_DEFINE_ENUM(NFS4ERR_DELAY); 122 TRACE_DEFINE_ENUM(NFS4ERR_DELEG_ALREADY_WANTED); 123 TRACE_DEFINE_ENUM(NFS4ERR_DELEG_REVOKED); 124 TRACE_DEFINE_ENUM(NFS4ERR_DENIED); 125 TRACE_DEFINE_ENUM(NFS4ERR_DIRDELEG_UNAVAIL); 126 TRACE_DEFINE_ENUM(NFS4ERR_DQUOT); 127 TRACE_DEFINE_ENUM(NFS4ERR_ENCR_ALG_UNSUPP); 128 TRACE_DEFINE_ENUM(NFS4ERR_EXIST); 129 TRACE_DEFINE_ENUM(NFS4ERR_EXPIRED); 130 TRACE_DEFINE_ENUM(NFS4ERR_FBIG); 131 TRACE_DEFINE_ENUM(NFS4ERR_FHEXPIRED); 132 TRACE_DEFINE_ENUM(NFS4ERR_FILE_OPEN); 133 TRACE_DEFINE_ENUM(NFS4ERR_GRACE); 134 TRACE_DEFINE_ENUM(NFS4ERR_HASH_ALG_UNSUPP); 135 TRACE_DEFINE_ENUM(NFS4ERR_INVAL); 136 TRACE_DEFINE_ENUM(NFS4ERR_IO); 137 TRACE_DEFINE_ENUM(NFS4ERR_ISDIR); 138 TRACE_DEFINE_ENUM(NFS4ERR_LAYOUTTRYLATER); 139 TRACE_DEFINE_ENUM(NFS4ERR_LAYOUTUNAVAILABLE); 140 TRACE_DEFINE_ENUM(NFS4ERR_LEASE_MOVED); 141 TRACE_DEFINE_ENUM(NFS4ERR_LOCKED); 142 TRACE_DEFINE_ENUM(NFS4ERR_LOCKS_HELD); 143 TRACE_DEFINE_ENUM(NFS4ERR_LOCK_RANGE); 144 TRACE_DEFINE_ENUM(NFS4ERR_MINOR_VERS_MISMATCH); 145 TRACE_DEFINE_ENUM(NFS4ERR_MLINK); 146 TRACE_DEFINE_ENUM(NFS4ERR_MOVED); 147 TRACE_DEFINE_ENUM(NFS4ERR_NAMETOOLONG); 148 TRACE_DEFINE_ENUM(NFS4ERR_NOENT); 149 TRACE_DEFINE_ENUM(NFS4ERR_NOFILEHANDLE); 150 TRACE_DEFINE_ENUM(NFS4ERR_NOMATCHING_LAYOUT); 151 TRACE_DEFINE_ENUM(NFS4ERR_NOSPC); 152 TRACE_DEFINE_ENUM(NFS4ERR_NOTDIR); 153 TRACE_DEFINE_ENUM(NFS4ERR_NOTEMPTY); 154 TRACE_DEFINE_ENUM(NFS4ERR_NOTSUPP); 155 TRACE_DEFINE_ENUM(NFS4ERR_NOT_ONLY_OP); 156 TRACE_DEFINE_ENUM(NFS4ERR_NOT_SAME); 157 TRACE_DEFINE_ENUM(NFS4ERR_NO_GRACE); 158 TRACE_DEFINE_ENUM(NFS4ERR_NXIO); 159 TRACE_DEFINE_ENUM(NFS4ERR_OLD_STATEID); 160 TRACE_DEFINE_ENUM(NFS4ERR_OPENMODE); 161 TRACE_DEFINE_ENUM(NFS4ERR_OP_ILLEGAL); 162 TRACE_DEFINE_ENUM(NFS4ERR_OP_NOT_IN_SESSION); 163 TRACE_DEFINE_ENUM(NFS4ERR_PERM); 164 TRACE_DEFINE_ENUM(NFS4ERR_PNFS_IO_HOLE); 165 TRACE_DEFINE_ENUM(NFS4ERR_PNFS_NO_LAYOUT); 166 TRACE_DEFINE_ENUM(NFS4ERR_RECALLCONFLICT); 167 TRACE_DEFINE_ENUM(NFS4ERR_RECLAIM_BAD); 168 TRACE_DEFINE_ENUM(NFS4ERR_RECLAIM_CONFLICT); 169 TRACE_DEFINE_ENUM(NFS4ERR_REJECT_DELEG); 170 TRACE_DEFINE_ENUM(NFS4ERR_REP_TOO_BIG); 171 TRACE_DEFINE_ENUM(NFS4ERR_REP_TOO_BIG_TO_CACHE); 172 TRACE_DEFINE_ENUM(NFS4ERR_REQ_TOO_BIG); 173 TRACE_DEFINE_ENUM(NFS4ERR_RESOURCE); 174 TRACE_DEFINE_ENUM(NFS4ERR_RESTOREFH); 175 TRACE_DEFINE_ENUM(NFS4ERR_RETRY_UNCACHED_REP); 176 TRACE_DEFINE_ENUM(NFS4ERR_RETURNCONFLICT); 177 TRACE_DEFINE_ENUM(NFS4ERR_ROFS); 178 TRACE_DEFINE_ENUM(NFS4ERR_SAME); 179 TRACE_DEFINE_ENUM(NFS4ERR_SHARE_DENIED); 180 TRACE_DEFINE_ENUM(NFS4ERR_SEQUENCE_POS); 181 TRACE_DEFINE_ENUM(NFS4ERR_SEQ_FALSE_RETRY); 182 TRACE_DEFINE_ENUM(NFS4ERR_SEQ_MISORDERED); 183 TRACE_DEFINE_ENUM(NFS4ERR_SERVERFAULT); 184 TRACE_DEFINE_ENUM(NFS4ERR_STALE); 185 TRACE_DEFINE_ENUM(NFS4ERR_STALE_CLIENTID); 186 TRACE_DEFINE_ENUM(NFS4ERR_STALE_STATEID); 187 TRACE_DEFINE_ENUM(NFS4ERR_SYMLINK); 188 TRACE_DEFINE_ENUM(NFS4ERR_TOOSMALL); 189 TRACE_DEFINE_ENUM(NFS4ERR_TOO_MANY_OPS); 190 TRACE_DEFINE_ENUM(NFS4ERR_UNKNOWN_LAYOUTTYPE); 191 TRACE_DEFINE_ENUM(NFS4ERR_UNSAFE_COMPOUND); 192 TRACE_DEFINE_ENUM(NFS4ERR_WRONGSEC); 193 TRACE_DEFINE_ENUM(NFS4ERR_WRONG_CRED); 194 TRACE_DEFINE_ENUM(NFS4ERR_WRONG_TYPE); 195 TRACE_DEFINE_ENUM(NFS4ERR_XDEV); 196 197 TRACE_DEFINE_ENUM(NFS4ERR_RESET_TO_MDS); 198 TRACE_DEFINE_ENUM(NFS4ERR_RESET_TO_PNFS); 199 200 #define show_nfs4_status(x) \ 201 __print_symbolic(x, \ 202 { NFS4_OK, "OK" }, \ 203 { EPERM, "EPERM" }, \ 204 { ENOENT, "ENOENT" }, \ 205 { EIO, "EIO" }, \ 206 { ENXIO, "ENXIO" }, \ 207 { EACCES, "EACCES" }, \ 208 { EEXIST, "EEXIST" }, \ 209 { EXDEV, "EXDEV" }, \ 210 { ENOTDIR, "ENOTDIR" }, \ 211 { EISDIR, "EISDIR" }, \ 212 { EFBIG, "EFBIG" }, \ 213 { ENOSPC, "ENOSPC" }, \ 214 { EROFS, "EROFS" }, \ 215 { EMLINK, "EMLINK" }, \ 216 { ENAMETOOLONG, "ENAMETOOLONG" }, \ 217 { ENOTEMPTY, "ENOTEMPTY" }, \ 218 { EDQUOT, "EDQUOT" }, \ 219 { ESTALE, "ESTALE" }, \ 220 { EBADHANDLE, "EBADHANDLE" }, \ 221 { EBADCOOKIE, "EBADCOOKIE" }, \ 222 { ENOTSUPP, "ENOTSUPP" }, \ 223 { ETOOSMALL, "ETOOSMALL" }, \ 224 { EREMOTEIO, "EREMOTEIO" }, \ 225 { EBADTYPE, "EBADTYPE" }, \ 226 { EAGAIN, "EAGAIN" }, \ 227 { ELOOP, "ELOOP" }, \ 228 { EOPNOTSUPP, "EOPNOTSUPP" }, \ 229 { EDEADLK, "EDEADLK" }, \ 230 { ENOMEM, "ENOMEM" }, \ 231 { EKEYEXPIRED, "EKEYEXPIRED" }, \ 232 { ETIMEDOUT, "ETIMEDOUT" }, \ 233 { ERESTARTSYS, "ERESTARTSYS" }, \ 234 { ECONNREFUSED, "ECONNREFUSED" }, \ 235 { ECONNRESET, "ECONNRESET" }, \ 236 { ENETUNREACH, "ENETUNREACH" }, \ 237 { EHOSTUNREACH, "EHOSTUNREACH" }, \ 238 { EHOSTDOWN, "EHOSTDOWN" }, \ 239 { EPIPE, "EPIPE" }, \ 240 { EPFNOSUPPORT, "EPFNOSUPPORT" }, \ 241 { EINVAL, "EINVAL" }, \ 242 { EPROTONOSUPPORT, "EPROTONOSUPPORT" }, \ 243 { NFS4ERR_ACCESS, "ACCESS" }, \ 244 { NFS4ERR_ATTRNOTSUPP, "ATTRNOTSUPP" }, \ 245 { NFS4ERR_ADMIN_REVOKED, "ADMIN_REVOKED" }, \ 246 { NFS4ERR_BACK_CHAN_BUSY, "BACK_CHAN_BUSY" }, \ 247 { NFS4ERR_BADCHAR, "BADCHAR" }, \ 248 { NFS4ERR_BADHANDLE, "BADHANDLE" }, \ 249 { NFS4ERR_BADIOMODE, "BADIOMODE" }, \ 250 { NFS4ERR_BADLAYOUT, "BADLAYOUT" }, \ 251 { NFS4ERR_BADLABEL, "BADLABEL" }, \ 252 { NFS4ERR_BADNAME, "BADNAME" }, \ 253 { NFS4ERR_BADOWNER, "BADOWNER" }, \ 254 { NFS4ERR_BADSESSION, "BADSESSION" }, \ 255 { NFS4ERR_BADSLOT, "BADSLOT" }, \ 256 { NFS4ERR_BADTYPE, "BADTYPE" }, \ 257 { NFS4ERR_BADXDR, "BADXDR" }, \ 258 { NFS4ERR_BAD_COOKIE, "BAD_COOKIE" }, \ 259 { NFS4ERR_BAD_HIGH_SLOT, "BAD_HIGH_SLOT" }, \ 260 { NFS4ERR_BAD_RANGE, "BAD_RANGE" }, \ 261 { NFS4ERR_BAD_SEQID, "BAD_SEQID" }, \ 262 { NFS4ERR_BAD_SESSION_DIGEST, "BAD_SESSION_DIGEST" }, \ 263 { NFS4ERR_BAD_STATEID, "BAD_STATEID" }, \ 264 { NFS4ERR_CB_PATH_DOWN, "CB_PATH_DOWN" }, \ 265 { NFS4ERR_CLID_INUSE, "CLID_INUSE" }, \ 266 { NFS4ERR_CLIENTID_BUSY, "CLIENTID_BUSY" }, \ 267 { NFS4ERR_COMPLETE_ALREADY, "COMPLETE_ALREADY" }, \ 268 { NFS4ERR_CONN_NOT_BOUND_TO_SESSION, "CONN_NOT_BOUND_TO_SESSION" }, \ 269 { NFS4ERR_DEADLOCK, "DEADLOCK" }, \ 270 { NFS4ERR_DEADSESSION, "DEAD_SESSION" }, \ 271 { NFS4ERR_DELAY, "DELAY" }, \ 272 { NFS4ERR_DELEG_ALREADY_WANTED, "DELEG_ALREADY_WANTED" }, \ 273 { NFS4ERR_DELEG_REVOKED, "DELEG_REVOKED" }, \ 274 { NFS4ERR_DENIED, "DENIED" }, \ 275 { NFS4ERR_DIRDELEG_UNAVAIL, "DIRDELEG_UNAVAIL" }, \ 276 { NFS4ERR_DQUOT, "DQUOT" }, \ 277 { NFS4ERR_ENCR_ALG_UNSUPP, "ENCR_ALG_UNSUPP" }, \ 278 { NFS4ERR_EXIST, "EXIST" }, \ 279 { NFS4ERR_EXPIRED, "EXPIRED" }, \ 280 { NFS4ERR_FBIG, "FBIG" }, \ 281 { NFS4ERR_FHEXPIRED, "FHEXPIRED" }, \ 282 { NFS4ERR_FILE_OPEN, "FILE_OPEN" }, \ 283 { NFS4ERR_GRACE, "GRACE" }, \ 284 { NFS4ERR_HASH_ALG_UNSUPP, "HASH_ALG_UNSUPP" }, \ 285 { NFS4ERR_INVAL, "INVAL" }, \ 286 { NFS4ERR_IO, "IO" }, \ 287 { NFS4ERR_ISDIR, "ISDIR" }, \ 288 { NFS4ERR_LAYOUTTRYLATER, "LAYOUTTRYLATER" }, \ 289 { NFS4ERR_LAYOUTUNAVAILABLE, "LAYOUTUNAVAILABLE" }, \ 290 { NFS4ERR_LEASE_MOVED, "LEASE_MOVED" }, \ 291 { NFS4ERR_LOCKED, "LOCKED" }, \ 292 { NFS4ERR_LOCKS_HELD, "LOCKS_HELD" }, \ 293 { NFS4ERR_LOCK_RANGE, "LOCK_RANGE" }, \ 294 { NFS4ERR_MINOR_VERS_MISMATCH, "MINOR_VERS_MISMATCH" }, \ 295 { NFS4ERR_MLINK, "MLINK" }, \ 296 { NFS4ERR_MOVED, "MOVED" }, \ 297 { NFS4ERR_NAMETOOLONG, "NAMETOOLONG" }, \ 298 { NFS4ERR_NOENT, "NOENT" }, \ 299 { NFS4ERR_NOFILEHANDLE, "NOFILEHANDLE" }, \ 300 { NFS4ERR_NOMATCHING_LAYOUT, "NOMATCHING_LAYOUT" }, \ 301 { NFS4ERR_NOSPC, "NOSPC" }, \ 302 { NFS4ERR_NOTDIR, "NOTDIR" }, \ 303 { NFS4ERR_NOTEMPTY, "NOTEMPTY" }, \ 304 { NFS4ERR_NOTSUPP, "NOTSUPP" }, \ 305 { NFS4ERR_NOT_ONLY_OP, "NOT_ONLY_OP" }, \ 306 { NFS4ERR_NOT_SAME, "NOT_SAME" }, \ 307 { NFS4ERR_NO_GRACE, "NO_GRACE" }, \ 308 { NFS4ERR_NXIO, "NXIO" }, \ 309 { NFS4ERR_OLD_STATEID, "OLD_STATEID" }, \ 310 { NFS4ERR_OPENMODE, "OPENMODE" }, \ 311 { NFS4ERR_OP_ILLEGAL, "OP_ILLEGAL" }, \ 312 { NFS4ERR_OP_NOT_IN_SESSION, "OP_NOT_IN_SESSION" }, \ 313 { NFS4ERR_PERM, "PERM" }, \ 314 { NFS4ERR_PNFS_IO_HOLE, "PNFS_IO_HOLE" }, \ 315 { NFS4ERR_PNFS_NO_LAYOUT, "PNFS_NO_LAYOUT" }, \ 316 { NFS4ERR_RECALLCONFLICT, "RECALLCONFLICT" }, \ 317 { NFS4ERR_RECLAIM_BAD, "RECLAIM_BAD" }, \ 318 { NFS4ERR_RECLAIM_CONFLICT, "RECLAIM_CONFLICT" }, \ 319 { NFS4ERR_REJECT_DELEG, "REJECT_DELEG" }, \ 320 { NFS4ERR_REP_TOO_BIG, "REP_TOO_BIG" }, \ 321 { NFS4ERR_REP_TOO_BIG_TO_CACHE, "REP_TOO_BIG_TO_CACHE" }, \ 322 { NFS4ERR_REQ_TOO_BIG, "REQ_TOO_BIG" }, \ 323 { NFS4ERR_RESOURCE, "RESOURCE" }, \ 324 { NFS4ERR_RESTOREFH, "RESTOREFH" }, \ 325 { NFS4ERR_RETRY_UNCACHED_REP, "RETRY_UNCACHED_REP" }, \ 326 { NFS4ERR_RETURNCONFLICT, "RETURNCONFLICT" }, \ 327 { NFS4ERR_ROFS, "ROFS" }, \ 328 { NFS4ERR_SAME, "SAME" }, \ 329 { NFS4ERR_SHARE_DENIED, "SHARE_DENIED" }, \ 330 { NFS4ERR_SEQUENCE_POS, "SEQUENCE_POS" }, \ 331 { NFS4ERR_SEQ_FALSE_RETRY, "SEQ_FALSE_RETRY" }, \ 332 { NFS4ERR_SEQ_MISORDERED, "SEQ_MISORDERED" }, \ 333 { NFS4ERR_SERVERFAULT, "SERVERFAULT" }, \ 334 { NFS4ERR_STALE, "STALE" }, \ 335 { NFS4ERR_STALE_CLIENTID, "STALE_CLIENTID" }, \ 336 { NFS4ERR_STALE_STATEID, "STALE_STATEID" }, \ 337 { NFS4ERR_SYMLINK, "SYMLINK" }, \ 338 { NFS4ERR_TOOSMALL, "TOOSMALL" }, \ 339 { NFS4ERR_TOO_MANY_OPS, "TOO_MANY_OPS" }, \ 340 { NFS4ERR_UNKNOWN_LAYOUTTYPE, "UNKNOWN_LAYOUTTYPE" }, \ 341 { NFS4ERR_UNSAFE_COMPOUND, "UNSAFE_COMPOUND" }, \ 342 { NFS4ERR_WRONGSEC, "WRONGSEC" }, \ 343 { NFS4ERR_WRONG_CRED, "WRONG_CRED" }, \ 344 { NFS4ERR_WRONG_TYPE, "WRONG_TYPE" }, \ 345 { NFS4ERR_XDEV, "XDEV" }, \ 346 /* ***** Internal to Linux NFS client ***** */ \ 347 { NFS4ERR_RESET_TO_MDS, "RESET_TO_MDS" }, \ 348 { NFS4ERR_RESET_TO_PNFS, "RESET_TO_PNFS" }) 349 350 #define show_nfs4_verifier(x) \ 351 __print_hex_str(x, NFS4_VERIFIER_SIZE) 352 353 TRACE_DEFINE_ENUM(IOMODE_READ); 354 TRACE_DEFINE_ENUM(IOMODE_RW); 355 TRACE_DEFINE_ENUM(IOMODE_ANY); 356 357 #define show_pnfs_layout_iomode(x) \ 358 __print_symbolic(x, \ 359 { IOMODE_READ, "READ" }, \ 360 { IOMODE_RW, "RW" }, \ 361 { IOMODE_ANY, "ANY" }) 362 363 #define show_rca_mask(x) \ 364 __print_flags(x, "|", \ 365 { BIT(RCA4_TYPE_MASK_RDATA_DLG), "RDATA_DLG" }, \ 366 { BIT(RCA4_TYPE_MASK_WDATA_DLG), "WDATA_DLG" }, \ 367 { BIT(RCA4_TYPE_MASK_DIR_DLG), "DIR_DLG" }, \ 368 { BIT(RCA4_TYPE_MASK_FILE_LAYOUT), "FILE_LAYOUT" }, \ 369 { BIT(RCA4_TYPE_MASK_BLK_LAYOUT), "BLK_LAYOUT" }, \ 370 { BIT(RCA4_TYPE_MASK_OBJ_LAYOUT_MIN), "OBJ_LAYOUT_MIN" }, \ 371 { BIT(RCA4_TYPE_MASK_OBJ_LAYOUT_MAX), "OBJ_LAYOUT_MAX" }, \ 372 { BIT(RCA4_TYPE_MASK_OTHER_LAYOUT_MIN), "OTHER_LAYOUT_MIN" }, \ 373 { BIT(RCA4_TYPE_MASK_OTHER_LAYOUT_MAX), "OTHER_LAYOUT_MAX" }) 374 375 #define show_nfs4_seq4_status(x) \ 376 __print_flags(x, "|", \ 377 { SEQ4_STATUS_CB_PATH_DOWN, "CB_PATH_DOWN" }, \ 378 { SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING, "CB_GSS_CONTEXTS_EXPIRING" }, \ 379 { SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED, "CB_GSS_CONTEXTS_EXPIRED" }, \ 380 { SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED, "EXPIRED_ALL_STATE_REVOKED" }, \ 381 { SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED, "EXPIRED_SOME_STATE_REVOKED" }, \ 382 { SEQ4_STATUS_ADMIN_STATE_REVOKED, "ADMIN_STATE_REVOKED" }, \ 383 { SEQ4_STATUS_RECALLABLE_STATE_REVOKED, "RECALLABLE_STATE_REVOKED" }, \ 384 { SEQ4_STATUS_LEASE_MOVED, "LEASE_MOVED" }, \ 385 { SEQ4_STATUS_RESTART_RECLAIM_NEEDED, "RESTART_RECLAIM_NEEDED" }, \ 386 { SEQ4_STATUS_CB_PATH_DOWN_SESSION, "CB_PATH_DOWN_SESSION" }, \ 387 { SEQ4_STATUS_BACKCHANNEL_FAULT, "BACKCHANNEL_FAULT" }) 388 389 TRACE_DEFINE_ENUM(OP_CB_GETATTR); 390 TRACE_DEFINE_ENUM(OP_CB_RECALL); 391 TRACE_DEFINE_ENUM(OP_CB_LAYOUTRECALL); 392 TRACE_DEFINE_ENUM(OP_CB_NOTIFY); 393 TRACE_DEFINE_ENUM(OP_CB_PUSH_DELEG); 394 TRACE_DEFINE_ENUM(OP_CB_RECALL_ANY); 395 TRACE_DEFINE_ENUM(OP_CB_RECALLABLE_OBJ_AVAIL); 396 TRACE_DEFINE_ENUM(OP_CB_RECALL_SLOT); 397 TRACE_DEFINE_ENUM(OP_CB_SEQUENCE); 398 TRACE_DEFINE_ENUM(OP_CB_WANTS_CANCELLED); 399 TRACE_DEFINE_ENUM(OP_CB_NOTIFY_LOCK); 400 TRACE_DEFINE_ENUM(OP_CB_NOTIFY_DEVICEID); 401 TRACE_DEFINE_ENUM(OP_CB_OFFLOAD); 402 TRACE_DEFINE_ENUM(OP_CB_ILLEGAL); 403 404 #define show_nfs4_cb_op(x) \ 405 __print_symbolic(x, \ 406 { 0, "CB_NULL" }, \ 407 { 1, "CB_COMPOUND" }, \ 408 { OP_CB_GETATTR, "CB_GETATTR" }, \ 409 { OP_CB_RECALL, "CB_RECALL" }, \ 410 { OP_CB_LAYOUTRECALL, "CB_LAYOUTRECALL" }, \ 411 { OP_CB_NOTIFY, "CB_NOTIFY" }, \ 412 { OP_CB_PUSH_DELEG, "CB_PUSH_DELEG" }, \ 413 { OP_CB_RECALL_ANY, "CB_RECALL_ANY" }, \ 414 { OP_CB_RECALLABLE_OBJ_AVAIL, "CB_RECALLABLE_OBJ_AVAIL" }, \ 415 { OP_CB_RECALL_SLOT, "CB_RECALL_SLOT" }, \ 416 { OP_CB_SEQUENCE, "CB_SEQUENCE" }, \ 417 { OP_CB_WANTS_CANCELLED, "CB_WANTS_CANCELLED" }, \ 418 { OP_CB_NOTIFY_LOCK, "CB_NOTIFY_LOCK" }, \ 419 { OP_CB_NOTIFY_DEVICEID, "CB_NOTIFY_DEVICEID" }, \ 420 { OP_CB_OFFLOAD, "CB_OFFLOAD" }, \ 421 { OP_CB_ILLEGAL, "CB_ILLEGAL" }) 422