1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Copyright (c) 2014 Christoph Hellwig. 4 */ 5 #undef TRACE_SYSTEM 6 #define TRACE_SYSTEM nfsd 7 8 #if !defined(_NFSD_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) 9 #define _NFSD_TRACE_H 10 11 #include <linux/tracepoint.h> 12 13 #include "export.h" 14 #include "nfsfh.h" 15 16 #define NFSD_TRACE_PROC_RES_FIELDS \ 17 __field(unsigned int, netns_ino) \ 18 __field(u32, xid) \ 19 __field(unsigned long, status) \ 20 __array(unsigned char, server, sizeof(struct sockaddr_in6)) \ 21 __array(unsigned char, client, sizeof(struct sockaddr_in6)) 22 23 #define NFSD_TRACE_PROC_RES_ASSIGNMENTS(error) \ 24 do { \ 25 __entry->netns_ino = SVC_NET(rqstp)->ns.inum; \ 26 __entry->xid = be32_to_cpu(rqstp->rq_xid); \ 27 __entry->status = be32_to_cpu(error); \ 28 memcpy(__entry->server, &rqstp->rq_xprt->xpt_local, \ 29 rqstp->rq_xprt->xpt_locallen); \ 30 memcpy(__entry->client, &rqstp->rq_xprt->xpt_remote, \ 31 rqstp->rq_xprt->xpt_remotelen); \ 32 } while (0); 33 34 DECLARE_EVENT_CLASS(nfsd_xdr_err_class, 35 TP_PROTO( 36 const struct svc_rqst *rqstp 37 ), 38 TP_ARGS(rqstp), 39 TP_STRUCT__entry( 40 __field(unsigned int, netns_ino) 41 __field(u32, xid) 42 __field(u32, vers) 43 __field(u32, proc) 44 __sockaddr(server, rqstp->rq_xprt->xpt_locallen) 45 __sockaddr(client, rqstp->rq_xprt->xpt_remotelen) 46 ), 47 TP_fast_assign( 48 const struct svc_xprt *xprt = rqstp->rq_xprt; 49 50 __entry->netns_ino = xprt->xpt_net->ns.inum; 51 __entry->xid = be32_to_cpu(rqstp->rq_xid); 52 __entry->vers = rqstp->rq_vers; 53 __entry->proc = rqstp->rq_proc; 54 __assign_sockaddr(server, &xprt->xpt_local, xprt->xpt_locallen); 55 __assign_sockaddr(client, &xprt->xpt_remote, xprt->xpt_remotelen); 56 ), 57 TP_printk("xid=0x%08x vers=%u proc=%u", 58 __entry->xid, __entry->vers, __entry->proc 59 ) 60 ); 61 62 #define DEFINE_NFSD_XDR_ERR_EVENT(name) \ 63 DEFINE_EVENT(nfsd_xdr_err_class, nfsd_##name##_err, \ 64 TP_PROTO(const struct svc_rqst *rqstp), \ 65 TP_ARGS(rqstp)) 66 67 DEFINE_NFSD_XDR_ERR_EVENT(garbage_args); 68 DEFINE_NFSD_XDR_ERR_EVENT(cant_encode); 69 70 #define show_nfsd_may_flags(x) \ 71 __print_flags(x, "|", \ 72 { NFSD_MAY_EXEC, "EXEC" }, \ 73 { NFSD_MAY_WRITE, "WRITE" }, \ 74 { NFSD_MAY_READ, "READ" }, \ 75 { NFSD_MAY_SATTR, "SATTR" }, \ 76 { NFSD_MAY_TRUNC, "TRUNC" }, \ 77 { NFSD_MAY_LOCK, "LOCK" }, \ 78 { NFSD_MAY_OWNER_OVERRIDE, "OWNER_OVERRIDE" }, \ 79 { NFSD_MAY_LOCAL_ACCESS, "LOCAL_ACCESS" }, \ 80 { NFSD_MAY_BYPASS_GSS_ON_ROOT, "BYPASS_GSS_ON_ROOT" }, \ 81 { NFSD_MAY_NOT_BREAK_LEASE, "NOT_BREAK_LEASE" }, \ 82 { NFSD_MAY_BYPASS_GSS, "BYPASS_GSS" }, \ 83 { NFSD_MAY_READ_IF_EXEC, "READ_IF_EXEC" }, \ 84 { NFSD_MAY_64BIT_COOKIE, "64BIT_COOKIE" }) 85 86 TRACE_EVENT(nfsd_compound, 87 TP_PROTO(const struct svc_rqst *rqst, 88 u32 args_opcnt), 89 TP_ARGS(rqst, args_opcnt), 90 TP_STRUCT__entry( 91 __field(u32, xid) 92 __field(u32, args_opcnt) 93 ), 94 TP_fast_assign( 95 __entry->xid = be32_to_cpu(rqst->rq_xid); 96 __entry->args_opcnt = args_opcnt; 97 ), 98 TP_printk("xid=0x%08x opcnt=%u", 99 __entry->xid, __entry->args_opcnt) 100 ) 101 102 TRACE_EVENT(nfsd_compound_status, 103 TP_PROTO(u32 args_opcnt, 104 u32 resp_opcnt, 105 __be32 status, 106 const char *name), 107 TP_ARGS(args_opcnt, resp_opcnt, status, name), 108 TP_STRUCT__entry( 109 __field(u32, args_opcnt) 110 __field(u32, resp_opcnt) 111 __field(int, status) 112 __string(name, name) 113 ), 114 TP_fast_assign( 115 __entry->args_opcnt = args_opcnt; 116 __entry->resp_opcnt = resp_opcnt; 117 __entry->status = be32_to_cpu(status); 118 __assign_str(name, name); 119 ), 120 TP_printk("op=%u/%u %s status=%d", 121 __entry->resp_opcnt, __entry->args_opcnt, 122 __get_str(name), __entry->status) 123 ) 124 125 TRACE_EVENT(nfsd_compound_decode_err, 126 TP_PROTO( 127 const struct svc_rqst *rqstp, 128 u32 args_opcnt, 129 u32 resp_opcnt, 130 u32 opnum, 131 __be32 status 132 ), 133 TP_ARGS(rqstp, args_opcnt, resp_opcnt, opnum, status), 134 TP_STRUCT__entry( 135 NFSD_TRACE_PROC_RES_FIELDS 136 137 __field(u32, args_opcnt) 138 __field(u32, resp_opcnt) 139 __field(u32, opnum) 140 ), 141 TP_fast_assign( 142 NFSD_TRACE_PROC_RES_ASSIGNMENTS(status) 143 144 __entry->args_opcnt = args_opcnt; 145 __entry->resp_opcnt = resp_opcnt; 146 __entry->opnum = opnum; 147 ), 148 TP_printk("op=%u/%u opnum=%u status=%lu", 149 __entry->resp_opcnt, __entry->args_opcnt, 150 __entry->opnum, __entry->status) 151 ); 152 153 TRACE_EVENT(nfsd_compound_encode_err, 154 TP_PROTO( 155 const struct svc_rqst *rqstp, 156 u32 opnum, 157 __be32 status 158 ), 159 TP_ARGS(rqstp, opnum, status), 160 TP_STRUCT__entry( 161 NFSD_TRACE_PROC_RES_FIELDS 162 163 __field(u32, opnum) 164 ), 165 TP_fast_assign( 166 NFSD_TRACE_PROC_RES_ASSIGNMENTS(status) 167 168 __entry->opnum = opnum; 169 ), 170 TP_printk("opnum=%u status=%lu", 171 __entry->opnum, __entry->status) 172 ); 173 174 175 DECLARE_EVENT_CLASS(nfsd_fh_err_class, 176 TP_PROTO(struct svc_rqst *rqstp, 177 struct svc_fh *fhp, 178 int status), 179 TP_ARGS(rqstp, fhp, status), 180 TP_STRUCT__entry( 181 __field(u32, xid) 182 __field(u32, fh_hash) 183 __field(int, status) 184 ), 185 TP_fast_assign( 186 __entry->xid = be32_to_cpu(rqstp->rq_xid); 187 __entry->fh_hash = knfsd_fh_hash(&fhp->fh_handle); 188 __entry->status = status; 189 ), 190 TP_printk("xid=0x%08x fh_hash=0x%08x status=%d", 191 __entry->xid, __entry->fh_hash, 192 __entry->status) 193 ) 194 195 #define DEFINE_NFSD_FH_ERR_EVENT(name) \ 196 DEFINE_EVENT(nfsd_fh_err_class, nfsd_##name, \ 197 TP_PROTO(struct svc_rqst *rqstp, \ 198 struct svc_fh *fhp, \ 199 int status), \ 200 TP_ARGS(rqstp, fhp, status)) 201 202 DEFINE_NFSD_FH_ERR_EVENT(set_fh_dentry_badexport); 203 DEFINE_NFSD_FH_ERR_EVENT(set_fh_dentry_badhandle); 204 205 TRACE_EVENT(nfsd_exp_find_key, 206 TP_PROTO(const struct svc_expkey *key, 207 int status), 208 TP_ARGS(key, status), 209 TP_STRUCT__entry( 210 __field(int, fsidtype) 211 __array(u32, fsid, 6) 212 __string(auth_domain, key->ek_client->name) 213 __field(int, status) 214 ), 215 TP_fast_assign( 216 __entry->fsidtype = key->ek_fsidtype; 217 memcpy(__entry->fsid, key->ek_fsid, 4*6); 218 __assign_str(auth_domain, key->ek_client->name); 219 __entry->status = status; 220 ), 221 TP_printk("fsid=%x::%s domain=%s status=%d", 222 __entry->fsidtype, 223 __print_array(__entry->fsid, 6, 4), 224 __get_str(auth_domain), 225 __entry->status 226 ) 227 ); 228 229 TRACE_EVENT(nfsd_expkey_update, 230 TP_PROTO(const struct svc_expkey *key, const char *exp_path), 231 TP_ARGS(key, exp_path), 232 TP_STRUCT__entry( 233 __field(int, fsidtype) 234 __array(u32, fsid, 6) 235 __string(auth_domain, key->ek_client->name) 236 __string(path, exp_path) 237 __field(bool, cache) 238 ), 239 TP_fast_assign( 240 __entry->fsidtype = key->ek_fsidtype; 241 memcpy(__entry->fsid, key->ek_fsid, 4*6); 242 __assign_str(auth_domain, key->ek_client->name); 243 __assign_str(path, exp_path); 244 __entry->cache = !test_bit(CACHE_NEGATIVE, &key->h.flags); 245 ), 246 TP_printk("fsid=%x::%s domain=%s path=%s cache=%s", 247 __entry->fsidtype, 248 __print_array(__entry->fsid, 6, 4), 249 __get_str(auth_domain), 250 __get_str(path), 251 __entry->cache ? "pos" : "neg" 252 ) 253 ); 254 255 TRACE_EVENT(nfsd_exp_get_by_name, 256 TP_PROTO(const struct svc_export *key, 257 int status), 258 TP_ARGS(key, status), 259 TP_STRUCT__entry( 260 __string(path, key->ex_path.dentry->d_name.name) 261 __string(auth_domain, key->ex_client->name) 262 __field(int, status) 263 ), 264 TP_fast_assign( 265 __assign_str(path, key->ex_path.dentry->d_name.name); 266 __assign_str(auth_domain, key->ex_client->name); 267 __entry->status = status; 268 ), 269 TP_printk("path=%s domain=%s status=%d", 270 __get_str(path), 271 __get_str(auth_domain), 272 __entry->status 273 ) 274 ); 275 276 TRACE_EVENT(nfsd_export_update, 277 TP_PROTO(const struct svc_export *key), 278 TP_ARGS(key), 279 TP_STRUCT__entry( 280 __string(path, key->ex_path.dentry->d_name.name) 281 __string(auth_domain, key->ex_client->name) 282 __field(bool, cache) 283 ), 284 TP_fast_assign( 285 __assign_str(path, key->ex_path.dentry->d_name.name); 286 __assign_str(auth_domain, key->ex_client->name); 287 __entry->cache = !test_bit(CACHE_NEGATIVE, &key->h.flags); 288 ), 289 TP_printk("path=%s domain=%s cache=%s", 290 __get_str(path), 291 __get_str(auth_domain), 292 __entry->cache ? "pos" : "neg" 293 ) 294 ); 295 296 DECLARE_EVENT_CLASS(nfsd_io_class, 297 TP_PROTO(struct svc_rqst *rqstp, 298 struct svc_fh *fhp, 299 u64 offset, 300 u32 len), 301 TP_ARGS(rqstp, fhp, offset, len), 302 TP_STRUCT__entry( 303 __field(u32, xid) 304 __field(u32, fh_hash) 305 __field(u64, offset) 306 __field(u32, len) 307 ), 308 TP_fast_assign( 309 __entry->xid = be32_to_cpu(rqstp->rq_xid); 310 __entry->fh_hash = knfsd_fh_hash(&fhp->fh_handle); 311 __entry->offset = offset; 312 __entry->len = len; 313 ), 314 TP_printk("xid=0x%08x fh_hash=0x%08x offset=%llu len=%u", 315 __entry->xid, __entry->fh_hash, 316 __entry->offset, __entry->len) 317 ) 318 319 #define DEFINE_NFSD_IO_EVENT(name) \ 320 DEFINE_EVENT(nfsd_io_class, nfsd_##name, \ 321 TP_PROTO(struct svc_rqst *rqstp, \ 322 struct svc_fh *fhp, \ 323 u64 offset, \ 324 u32 len), \ 325 TP_ARGS(rqstp, fhp, offset, len)) 326 327 DEFINE_NFSD_IO_EVENT(read_start); 328 DEFINE_NFSD_IO_EVENT(read_splice); 329 DEFINE_NFSD_IO_EVENT(read_vector); 330 DEFINE_NFSD_IO_EVENT(read_io_done); 331 DEFINE_NFSD_IO_EVENT(read_done); 332 DEFINE_NFSD_IO_EVENT(write_start); 333 DEFINE_NFSD_IO_EVENT(write_opened); 334 DEFINE_NFSD_IO_EVENT(write_io_done); 335 DEFINE_NFSD_IO_EVENT(write_done); 336 337 DECLARE_EVENT_CLASS(nfsd_err_class, 338 TP_PROTO(struct svc_rqst *rqstp, 339 struct svc_fh *fhp, 340 loff_t offset, 341 int status), 342 TP_ARGS(rqstp, fhp, offset, status), 343 TP_STRUCT__entry( 344 __field(u32, xid) 345 __field(u32, fh_hash) 346 __field(loff_t, offset) 347 __field(int, status) 348 ), 349 TP_fast_assign( 350 __entry->xid = be32_to_cpu(rqstp->rq_xid); 351 __entry->fh_hash = knfsd_fh_hash(&fhp->fh_handle); 352 __entry->offset = offset; 353 __entry->status = status; 354 ), 355 TP_printk("xid=0x%08x fh_hash=0x%08x offset=%lld status=%d", 356 __entry->xid, __entry->fh_hash, 357 __entry->offset, __entry->status) 358 ) 359 360 #define DEFINE_NFSD_ERR_EVENT(name) \ 361 DEFINE_EVENT(nfsd_err_class, nfsd_##name, \ 362 TP_PROTO(struct svc_rqst *rqstp, \ 363 struct svc_fh *fhp, \ 364 loff_t offset, \ 365 int len), \ 366 TP_ARGS(rqstp, fhp, offset, len)) 367 368 DEFINE_NFSD_ERR_EVENT(read_err); 369 DEFINE_NFSD_ERR_EVENT(write_err); 370 371 TRACE_EVENT(nfsd_dirent, 372 TP_PROTO(struct svc_fh *fhp, 373 u64 ino, 374 const char *name, 375 int namlen), 376 TP_ARGS(fhp, ino, name, namlen), 377 TP_STRUCT__entry( 378 __field(u32, fh_hash) 379 __field(u64, ino) 380 __string_len(name, name, namlen) 381 ), 382 TP_fast_assign( 383 __entry->fh_hash = fhp ? knfsd_fh_hash(&fhp->fh_handle) : 0; 384 __entry->ino = ino; 385 __assign_str_len(name, name, namlen) 386 ), 387 TP_printk("fh_hash=0x%08x ino=%llu name=%s", 388 __entry->fh_hash, __entry->ino, __get_str(name) 389 ) 390 ) 391 392 DECLARE_EVENT_CLASS(nfsd_copy_err_class, 393 TP_PROTO(struct svc_rqst *rqstp, 394 struct svc_fh *src_fhp, 395 loff_t src_offset, 396 struct svc_fh *dst_fhp, 397 loff_t dst_offset, 398 u64 count, 399 int status), 400 TP_ARGS(rqstp, src_fhp, src_offset, dst_fhp, dst_offset, count, status), 401 TP_STRUCT__entry( 402 __field(u32, xid) 403 __field(u32, src_fh_hash) 404 __field(loff_t, src_offset) 405 __field(u32, dst_fh_hash) 406 __field(loff_t, dst_offset) 407 __field(u64, count) 408 __field(int, status) 409 ), 410 TP_fast_assign( 411 __entry->xid = be32_to_cpu(rqstp->rq_xid); 412 __entry->src_fh_hash = knfsd_fh_hash(&src_fhp->fh_handle); 413 __entry->src_offset = src_offset; 414 __entry->dst_fh_hash = knfsd_fh_hash(&dst_fhp->fh_handle); 415 __entry->dst_offset = dst_offset; 416 __entry->count = count; 417 __entry->status = status; 418 ), 419 TP_printk("xid=0x%08x src_fh_hash=0x%08x src_offset=%lld " 420 "dst_fh_hash=0x%08x dst_offset=%lld " 421 "count=%llu status=%d", 422 __entry->xid, __entry->src_fh_hash, __entry->src_offset, 423 __entry->dst_fh_hash, __entry->dst_offset, 424 (unsigned long long)__entry->count, 425 __entry->status) 426 ) 427 428 #define DEFINE_NFSD_COPY_ERR_EVENT(name) \ 429 DEFINE_EVENT(nfsd_copy_err_class, nfsd_##name, \ 430 TP_PROTO(struct svc_rqst *rqstp, \ 431 struct svc_fh *src_fhp, \ 432 loff_t src_offset, \ 433 struct svc_fh *dst_fhp, \ 434 loff_t dst_offset, \ 435 u64 count, \ 436 int status), \ 437 TP_ARGS(rqstp, src_fhp, src_offset, dst_fhp, dst_offset, \ 438 count, status)) 439 440 DEFINE_NFSD_COPY_ERR_EVENT(clone_file_range_err); 441 442 #include "state.h" 443 #include "filecache.h" 444 #include "vfs.h" 445 446 DECLARE_EVENT_CLASS(nfsd_stateid_class, 447 TP_PROTO(stateid_t *stp), 448 TP_ARGS(stp), 449 TP_STRUCT__entry( 450 __field(u32, cl_boot) 451 __field(u32, cl_id) 452 __field(u32, si_id) 453 __field(u32, si_generation) 454 ), 455 TP_fast_assign( 456 __entry->cl_boot = stp->si_opaque.so_clid.cl_boot; 457 __entry->cl_id = stp->si_opaque.so_clid.cl_id; 458 __entry->si_id = stp->si_opaque.so_id; 459 __entry->si_generation = stp->si_generation; 460 ), 461 TP_printk("client %08x:%08x stateid %08x:%08x", 462 __entry->cl_boot, 463 __entry->cl_id, 464 __entry->si_id, 465 __entry->si_generation) 466 ) 467 468 #define DEFINE_STATEID_EVENT(name) \ 469 DEFINE_EVENT(nfsd_stateid_class, nfsd_##name, \ 470 TP_PROTO(stateid_t *stp), \ 471 TP_ARGS(stp)) 472 473 DEFINE_STATEID_EVENT(layoutstate_alloc); 474 DEFINE_STATEID_EVENT(layoutstate_unhash); 475 DEFINE_STATEID_EVENT(layoutstate_free); 476 DEFINE_STATEID_EVENT(layout_get_lookup_fail); 477 DEFINE_STATEID_EVENT(layout_commit_lookup_fail); 478 DEFINE_STATEID_EVENT(layout_return_lookup_fail); 479 DEFINE_STATEID_EVENT(layout_recall); 480 DEFINE_STATEID_EVENT(layout_recall_done); 481 DEFINE_STATEID_EVENT(layout_recall_fail); 482 DEFINE_STATEID_EVENT(layout_recall_release); 483 484 DEFINE_STATEID_EVENT(open); 485 DEFINE_STATEID_EVENT(deleg_read); 486 DEFINE_STATEID_EVENT(deleg_recall); 487 488 DECLARE_EVENT_CLASS(nfsd_stateseqid_class, 489 TP_PROTO(u32 seqid, const stateid_t *stp), 490 TP_ARGS(seqid, stp), 491 TP_STRUCT__entry( 492 __field(u32, seqid) 493 __field(u32, cl_boot) 494 __field(u32, cl_id) 495 __field(u32, si_id) 496 __field(u32, si_generation) 497 ), 498 TP_fast_assign( 499 __entry->seqid = seqid; 500 __entry->cl_boot = stp->si_opaque.so_clid.cl_boot; 501 __entry->cl_id = stp->si_opaque.so_clid.cl_id; 502 __entry->si_id = stp->si_opaque.so_id; 503 __entry->si_generation = stp->si_generation; 504 ), 505 TP_printk("seqid=%u client %08x:%08x stateid %08x:%08x", 506 __entry->seqid, __entry->cl_boot, __entry->cl_id, 507 __entry->si_id, __entry->si_generation) 508 ) 509 510 #define DEFINE_STATESEQID_EVENT(name) \ 511 DEFINE_EVENT(nfsd_stateseqid_class, nfsd_##name, \ 512 TP_PROTO(u32 seqid, const stateid_t *stp), \ 513 TP_ARGS(seqid, stp)) 514 515 DEFINE_STATESEQID_EVENT(preprocess); 516 DEFINE_STATESEQID_EVENT(open_confirm); 517 518 DECLARE_EVENT_CLASS(nfsd_clientid_class, 519 TP_PROTO(const clientid_t *clid), 520 TP_ARGS(clid), 521 TP_STRUCT__entry( 522 __field(u32, cl_boot) 523 __field(u32, cl_id) 524 ), 525 TP_fast_assign( 526 __entry->cl_boot = clid->cl_boot; 527 __entry->cl_id = clid->cl_id; 528 ), 529 TP_printk("client %08x:%08x", __entry->cl_boot, __entry->cl_id) 530 ) 531 532 #define DEFINE_CLIENTID_EVENT(name) \ 533 DEFINE_EVENT(nfsd_clientid_class, nfsd_clid_##name, \ 534 TP_PROTO(const clientid_t *clid), \ 535 TP_ARGS(clid)) 536 537 DEFINE_CLIENTID_EVENT(expire_unconf); 538 DEFINE_CLIENTID_EVENT(reclaim_complete); 539 DEFINE_CLIENTID_EVENT(confirmed); 540 DEFINE_CLIENTID_EVENT(destroyed); 541 DEFINE_CLIENTID_EVENT(admin_expired); 542 DEFINE_CLIENTID_EVENT(replaced); 543 DEFINE_CLIENTID_EVENT(purged); 544 DEFINE_CLIENTID_EVENT(renew); 545 DEFINE_CLIENTID_EVENT(stale); 546 547 DECLARE_EVENT_CLASS(nfsd_net_class, 548 TP_PROTO(const struct nfsd_net *nn), 549 TP_ARGS(nn), 550 TP_STRUCT__entry( 551 __field(unsigned long long, boot_time) 552 ), 553 TP_fast_assign( 554 __entry->boot_time = nn->boot_time; 555 ), 556 TP_printk("boot_time=%16llx", __entry->boot_time) 557 ) 558 559 #define DEFINE_NET_EVENT(name) \ 560 DEFINE_EVENT(nfsd_net_class, nfsd_##name, \ 561 TP_PROTO(const struct nfsd_net *nn), \ 562 TP_ARGS(nn)) 563 564 DEFINE_NET_EVENT(grace_start); 565 DEFINE_NET_EVENT(grace_complete); 566 567 TRACE_EVENT(nfsd_writeverf_reset, 568 TP_PROTO( 569 const struct nfsd_net *nn, 570 const struct svc_rqst *rqstp, 571 int error 572 ), 573 TP_ARGS(nn, rqstp, error), 574 TP_STRUCT__entry( 575 __field(unsigned long long, boot_time) 576 __field(u32, xid) 577 __field(int, error) 578 __array(unsigned char, verifier, NFS4_VERIFIER_SIZE) 579 ), 580 TP_fast_assign( 581 __entry->boot_time = nn->boot_time; 582 __entry->xid = be32_to_cpu(rqstp->rq_xid); 583 __entry->error = error; 584 585 /* avoid seqlock inside TP_fast_assign */ 586 memcpy(__entry->verifier, nn->writeverf, 587 NFS4_VERIFIER_SIZE); 588 ), 589 TP_printk("boot_time=%16llx xid=0x%08x error=%d new verifier=0x%s", 590 __entry->boot_time, __entry->xid, __entry->error, 591 __print_hex_str(__entry->verifier, NFS4_VERIFIER_SIZE) 592 ) 593 ); 594 595 TRACE_EVENT(nfsd_clid_cred_mismatch, 596 TP_PROTO( 597 const struct nfs4_client *clp, 598 const struct svc_rqst *rqstp 599 ), 600 TP_ARGS(clp, rqstp), 601 TP_STRUCT__entry( 602 __field(u32, cl_boot) 603 __field(u32, cl_id) 604 __field(unsigned long, cl_flavor) 605 __field(unsigned long, new_flavor) 606 __sockaddr(addr, rqstp->rq_xprt->xpt_remotelen) 607 ), 608 TP_fast_assign( 609 __entry->cl_boot = clp->cl_clientid.cl_boot; 610 __entry->cl_id = clp->cl_clientid.cl_id; 611 __entry->cl_flavor = clp->cl_cred.cr_flavor; 612 __entry->new_flavor = rqstp->rq_cred.cr_flavor; 613 __assign_sockaddr(addr, &rqstp->rq_xprt->xpt_remote, 614 rqstp->rq_xprt->xpt_remotelen); 615 ), 616 TP_printk("client %08x:%08x flavor=%s, conflict=%s from addr=%pISpc", 617 __entry->cl_boot, __entry->cl_id, 618 show_nfsd_authflavor(__entry->cl_flavor), 619 show_nfsd_authflavor(__entry->new_flavor), 620 __get_sockaddr(addr) 621 ) 622 ) 623 624 TRACE_EVENT(nfsd_clid_verf_mismatch, 625 TP_PROTO( 626 const struct nfs4_client *clp, 627 const struct svc_rqst *rqstp, 628 const nfs4_verifier *verf 629 ), 630 TP_ARGS(clp, rqstp, verf), 631 TP_STRUCT__entry( 632 __field(u32, cl_boot) 633 __field(u32, cl_id) 634 __array(unsigned char, cl_verifier, NFS4_VERIFIER_SIZE) 635 __array(unsigned char, new_verifier, NFS4_VERIFIER_SIZE) 636 __sockaddr(addr, rqstp->rq_xprt->xpt_remotelen) 637 ), 638 TP_fast_assign( 639 __entry->cl_boot = clp->cl_clientid.cl_boot; 640 __entry->cl_id = clp->cl_clientid.cl_id; 641 memcpy(__entry->cl_verifier, (void *)&clp->cl_verifier, 642 NFS4_VERIFIER_SIZE); 643 memcpy(__entry->new_verifier, (void *)verf, 644 NFS4_VERIFIER_SIZE); 645 __assign_sockaddr(addr, &rqstp->rq_xprt->xpt_remote, 646 rqstp->rq_xprt->xpt_remotelen); 647 ), 648 TP_printk("client %08x:%08x verf=0x%s, updated=0x%s from addr=%pISpc", 649 __entry->cl_boot, __entry->cl_id, 650 __print_hex_str(__entry->cl_verifier, NFS4_VERIFIER_SIZE), 651 __print_hex_str(__entry->new_verifier, NFS4_VERIFIER_SIZE), 652 __get_sockaddr(addr) 653 ) 654 ); 655 656 DECLARE_EVENT_CLASS(nfsd_clid_class, 657 TP_PROTO(const struct nfs4_client *clp), 658 TP_ARGS(clp), 659 TP_STRUCT__entry( 660 __field(u32, cl_boot) 661 __field(u32, cl_id) 662 __array(unsigned char, addr, sizeof(struct sockaddr_in6)) 663 __field(unsigned long, flavor) 664 __array(unsigned char, verifier, NFS4_VERIFIER_SIZE) 665 __string_len(name, name, clp->cl_name.len) 666 ), 667 TP_fast_assign( 668 __entry->cl_boot = clp->cl_clientid.cl_boot; 669 __entry->cl_id = clp->cl_clientid.cl_id; 670 memcpy(__entry->addr, &clp->cl_addr, 671 sizeof(struct sockaddr_in6)); 672 __entry->flavor = clp->cl_cred.cr_flavor; 673 memcpy(__entry->verifier, (void *)&clp->cl_verifier, 674 NFS4_VERIFIER_SIZE); 675 __assign_str_len(name, clp->cl_name.data, clp->cl_name.len); 676 ), 677 TP_printk("addr=%pISpc name='%s' verifier=0x%s flavor=%s client=%08x:%08x", 678 __entry->addr, __get_str(name), 679 __print_hex_str(__entry->verifier, NFS4_VERIFIER_SIZE), 680 show_nfsd_authflavor(__entry->flavor), 681 __entry->cl_boot, __entry->cl_id) 682 ); 683 684 #define DEFINE_CLID_EVENT(name) \ 685 DEFINE_EVENT(nfsd_clid_class, nfsd_clid_##name, \ 686 TP_PROTO(const struct nfs4_client *clp), \ 687 TP_ARGS(clp)) 688 689 DEFINE_CLID_EVENT(fresh); 690 DEFINE_CLID_EVENT(confirmed_r); 691 692 /* 693 * from fs/nfsd/filecache.h 694 */ 695 #define show_nf_flags(val) \ 696 __print_flags(val, "|", \ 697 { 1 << NFSD_FILE_HASHED, "HASHED" }, \ 698 { 1 << NFSD_FILE_PENDING, "PENDING" }, \ 699 { 1 << NFSD_FILE_BREAK_READ, "BREAK_READ" }, \ 700 { 1 << NFSD_FILE_BREAK_WRITE, "BREAK_WRITE" }, \ 701 { 1 << NFSD_FILE_REFERENCED, "REFERENCED"}) 702 703 DECLARE_EVENT_CLASS(nfsd_file_class, 704 TP_PROTO(struct nfsd_file *nf), 705 TP_ARGS(nf), 706 TP_STRUCT__entry( 707 __field(unsigned int, nf_hashval) 708 __field(void *, nf_inode) 709 __field(int, nf_ref) 710 __field(unsigned long, nf_flags) 711 __field(unsigned char, nf_may) 712 __field(struct file *, nf_file) 713 ), 714 TP_fast_assign( 715 __entry->nf_hashval = nf->nf_hashval; 716 __entry->nf_inode = nf->nf_inode; 717 __entry->nf_ref = refcount_read(&nf->nf_ref); 718 __entry->nf_flags = nf->nf_flags; 719 __entry->nf_may = nf->nf_may; 720 __entry->nf_file = nf->nf_file; 721 ), 722 TP_printk("hash=0x%x inode=%p ref=%d flags=%s may=%s file=%p", 723 __entry->nf_hashval, 724 __entry->nf_inode, 725 __entry->nf_ref, 726 show_nf_flags(__entry->nf_flags), 727 show_nfsd_may_flags(__entry->nf_may), 728 __entry->nf_file) 729 ) 730 731 #define DEFINE_NFSD_FILE_EVENT(name) \ 732 DEFINE_EVENT(nfsd_file_class, name, \ 733 TP_PROTO(struct nfsd_file *nf), \ 734 TP_ARGS(nf)) 735 736 DEFINE_NFSD_FILE_EVENT(nfsd_file_alloc); 737 DEFINE_NFSD_FILE_EVENT(nfsd_file_put_final); 738 DEFINE_NFSD_FILE_EVENT(nfsd_file_unhash); 739 DEFINE_NFSD_FILE_EVENT(nfsd_file_put); 740 DEFINE_NFSD_FILE_EVENT(nfsd_file_unhash_and_release_locked); 741 742 TRACE_EVENT(nfsd_file_acquire, 743 TP_PROTO(struct svc_rqst *rqstp, unsigned int hash, 744 struct inode *inode, unsigned int may_flags, 745 struct nfsd_file *nf, __be32 status), 746 747 TP_ARGS(rqstp, hash, inode, may_flags, nf, status), 748 749 TP_STRUCT__entry( 750 __field(u32, xid) 751 __field(unsigned int, hash) 752 __field(void *, inode) 753 __field(unsigned long, may_flags) 754 __field(int, nf_ref) 755 __field(unsigned long, nf_flags) 756 __field(unsigned long, nf_may) 757 __field(struct file *, nf_file) 758 __field(u32, status) 759 ), 760 761 TP_fast_assign( 762 __entry->xid = be32_to_cpu(rqstp->rq_xid); 763 __entry->hash = hash; 764 __entry->inode = inode; 765 __entry->may_flags = may_flags; 766 __entry->nf_ref = nf ? refcount_read(&nf->nf_ref) : 0; 767 __entry->nf_flags = nf ? nf->nf_flags : 0; 768 __entry->nf_may = nf ? nf->nf_may : 0; 769 __entry->nf_file = nf ? nf->nf_file : NULL; 770 __entry->status = be32_to_cpu(status); 771 ), 772 773 TP_printk("xid=0x%x hash=0x%x inode=%p may_flags=%s ref=%d nf_flags=%s nf_may=%s nf_file=%p status=%u", 774 __entry->xid, __entry->hash, __entry->inode, 775 show_nfsd_may_flags(__entry->may_flags), 776 __entry->nf_ref, show_nf_flags(__entry->nf_flags), 777 show_nfsd_may_flags(__entry->nf_may), 778 __entry->nf_file, __entry->status) 779 ); 780 781 TRACE_EVENT(nfsd_file_open, 782 TP_PROTO(struct nfsd_file *nf, __be32 status), 783 TP_ARGS(nf, status), 784 TP_STRUCT__entry( 785 __field(unsigned int, nf_hashval) 786 __field(void *, nf_inode) /* cannot be dereferenced */ 787 __field(int, nf_ref) 788 __field(unsigned long, nf_flags) 789 __field(unsigned long, nf_may) 790 __field(void *, nf_file) /* cannot be dereferenced */ 791 ), 792 TP_fast_assign( 793 __entry->nf_hashval = nf->nf_hashval; 794 __entry->nf_inode = nf->nf_inode; 795 __entry->nf_ref = refcount_read(&nf->nf_ref); 796 __entry->nf_flags = nf->nf_flags; 797 __entry->nf_may = nf->nf_may; 798 __entry->nf_file = nf->nf_file; 799 ), 800 TP_printk("hash=0x%x inode=%p ref=%d flags=%s may=%s file=%p", 801 __entry->nf_hashval, 802 __entry->nf_inode, 803 __entry->nf_ref, 804 show_nf_flags(__entry->nf_flags), 805 show_nfsd_may_flags(__entry->nf_may), 806 __entry->nf_file) 807 ) 808 809 DECLARE_EVENT_CLASS(nfsd_file_search_class, 810 TP_PROTO(struct inode *inode, unsigned int hash, int found), 811 TP_ARGS(inode, hash, found), 812 TP_STRUCT__entry( 813 __field(struct inode *, inode) 814 __field(unsigned int, hash) 815 __field(int, found) 816 ), 817 TP_fast_assign( 818 __entry->inode = inode; 819 __entry->hash = hash; 820 __entry->found = found; 821 ), 822 TP_printk("hash=0x%x inode=%p found=%d", __entry->hash, 823 __entry->inode, __entry->found) 824 ); 825 826 #define DEFINE_NFSD_FILE_SEARCH_EVENT(name) \ 827 DEFINE_EVENT(nfsd_file_search_class, name, \ 828 TP_PROTO(struct inode *inode, unsigned int hash, int found), \ 829 TP_ARGS(inode, hash, found)) 830 831 DEFINE_NFSD_FILE_SEARCH_EVENT(nfsd_file_close_inode_sync); 832 DEFINE_NFSD_FILE_SEARCH_EVENT(nfsd_file_close_inode); 833 DEFINE_NFSD_FILE_SEARCH_EVENT(nfsd_file_is_cached); 834 835 TRACE_EVENT(nfsd_file_fsnotify_handle_event, 836 TP_PROTO(struct inode *inode, u32 mask), 837 TP_ARGS(inode, mask), 838 TP_STRUCT__entry( 839 __field(struct inode *, inode) 840 __field(unsigned int, nlink) 841 __field(umode_t, mode) 842 __field(u32, mask) 843 ), 844 TP_fast_assign( 845 __entry->inode = inode; 846 __entry->nlink = inode->i_nlink; 847 __entry->mode = inode->i_mode; 848 __entry->mask = mask; 849 ), 850 TP_printk("inode=%p nlink=%u mode=0%ho mask=0x%x", __entry->inode, 851 __entry->nlink, __entry->mode, __entry->mask) 852 ); 853 854 #include "cache.h" 855 856 TRACE_DEFINE_ENUM(RC_DROPIT); 857 TRACE_DEFINE_ENUM(RC_REPLY); 858 TRACE_DEFINE_ENUM(RC_DOIT); 859 860 #define show_drc_retval(x) \ 861 __print_symbolic(x, \ 862 { RC_DROPIT, "DROPIT" }, \ 863 { RC_REPLY, "REPLY" }, \ 864 { RC_DOIT, "DOIT" }) 865 866 TRACE_EVENT(nfsd_drc_found, 867 TP_PROTO( 868 const struct nfsd_net *nn, 869 const struct svc_rqst *rqstp, 870 int result 871 ), 872 TP_ARGS(nn, rqstp, result), 873 TP_STRUCT__entry( 874 __field(unsigned long long, boot_time) 875 __field(unsigned long, result) 876 __field(u32, xid) 877 ), 878 TP_fast_assign( 879 __entry->boot_time = nn->boot_time; 880 __entry->result = result; 881 __entry->xid = be32_to_cpu(rqstp->rq_xid); 882 ), 883 TP_printk("boot_time=%16llx xid=0x%08x result=%s", 884 __entry->boot_time, __entry->xid, 885 show_drc_retval(__entry->result)) 886 887 ); 888 889 TRACE_EVENT(nfsd_drc_mismatch, 890 TP_PROTO( 891 const struct nfsd_net *nn, 892 const struct svc_cacherep *key, 893 const struct svc_cacherep *rp 894 ), 895 TP_ARGS(nn, key, rp), 896 TP_STRUCT__entry( 897 __field(unsigned long long, boot_time) 898 __field(u32, xid) 899 __field(u32, cached) 900 __field(u32, ingress) 901 ), 902 TP_fast_assign( 903 __entry->boot_time = nn->boot_time; 904 __entry->xid = be32_to_cpu(key->c_key.k_xid); 905 __entry->cached = (__force u32)key->c_key.k_csum; 906 __entry->ingress = (__force u32)rp->c_key.k_csum; 907 ), 908 TP_printk("boot_time=%16llx xid=0x%08x cached-csum=0x%08x ingress-csum=0x%08x", 909 __entry->boot_time, __entry->xid, __entry->cached, 910 __entry->ingress) 911 ); 912 913 TRACE_EVENT(nfsd_cb_args, 914 TP_PROTO( 915 const struct nfs4_client *clp, 916 const struct nfs4_cb_conn *conn 917 ), 918 TP_ARGS(clp, conn), 919 TP_STRUCT__entry( 920 __field(u32, cl_boot) 921 __field(u32, cl_id) 922 __field(u32, prog) 923 __field(u32, ident) 924 __sockaddr(addr, conn->cb_addrlen) 925 ), 926 TP_fast_assign( 927 __entry->cl_boot = clp->cl_clientid.cl_boot; 928 __entry->cl_id = clp->cl_clientid.cl_id; 929 __entry->prog = conn->cb_prog; 930 __entry->ident = conn->cb_ident; 931 __assign_sockaddr(addr, &conn->cb_addr, conn->cb_addrlen); 932 ), 933 TP_printk("addr=%pISpc client %08x:%08x prog=%u ident=%u", 934 __get_sockaddr(addr), __entry->cl_boot, __entry->cl_id, 935 __entry->prog, __entry->ident) 936 ); 937 938 TRACE_EVENT(nfsd_cb_nodelegs, 939 TP_PROTO(const struct nfs4_client *clp), 940 TP_ARGS(clp), 941 TP_STRUCT__entry( 942 __field(u32, cl_boot) 943 __field(u32, cl_id) 944 ), 945 TP_fast_assign( 946 __entry->cl_boot = clp->cl_clientid.cl_boot; 947 __entry->cl_id = clp->cl_clientid.cl_id; 948 ), 949 TP_printk("client %08x:%08x", __entry->cl_boot, __entry->cl_id) 950 ) 951 952 #define show_cb_state(val) \ 953 __print_symbolic(val, \ 954 { NFSD4_CB_UP, "UP" }, \ 955 { NFSD4_CB_UNKNOWN, "UNKNOWN" }, \ 956 { NFSD4_CB_DOWN, "DOWN" }, \ 957 { NFSD4_CB_FAULT, "FAULT"}) 958 959 DECLARE_EVENT_CLASS(nfsd_cb_class, 960 TP_PROTO(const struct nfs4_client *clp), 961 TP_ARGS(clp), 962 TP_STRUCT__entry( 963 __field(unsigned long, state) 964 __field(u32, cl_boot) 965 __field(u32, cl_id) 966 __sockaddr(addr, clp->cl_cb_conn.cb_addrlen) 967 ), 968 TP_fast_assign( 969 __entry->state = clp->cl_cb_state; 970 __entry->cl_boot = clp->cl_clientid.cl_boot; 971 __entry->cl_id = clp->cl_clientid.cl_id; 972 __assign_sockaddr(addr, &clp->cl_cb_conn.cb_addr, 973 clp->cl_cb_conn.cb_addrlen) 974 ), 975 TP_printk("addr=%pISpc client %08x:%08x state=%s", 976 __get_sockaddr(addr), __entry->cl_boot, __entry->cl_id, 977 show_cb_state(__entry->state)) 978 ); 979 980 #define DEFINE_NFSD_CB_EVENT(name) \ 981 DEFINE_EVENT(nfsd_cb_class, nfsd_cb_##name, \ 982 TP_PROTO(const struct nfs4_client *clp), \ 983 TP_ARGS(clp)) 984 985 DEFINE_NFSD_CB_EVENT(state); 986 DEFINE_NFSD_CB_EVENT(probe); 987 DEFINE_NFSD_CB_EVENT(lost); 988 DEFINE_NFSD_CB_EVENT(shutdown); 989 990 TRACE_DEFINE_ENUM(RPC_AUTH_NULL); 991 TRACE_DEFINE_ENUM(RPC_AUTH_UNIX); 992 TRACE_DEFINE_ENUM(RPC_AUTH_GSS); 993 TRACE_DEFINE_ENUM(RPC_AUTH_GSS_KRB5); 994 TRACE_DEFINE_ENUM(RPC_AUTH_GSS_KRB5I); 995 TRACE_DEFINE_ENUM(RPC_AUTH_GSS_KRB5P); 996 997 #define show_nfsd_authflavor(val) \ 998 __print_symbolic(val, \ 999 { RPC_AUTH_NULL, "none" }, \ 1000 { RPC_AUTH_UNIX, "sys" }, \ 1001 { RPC_AUTH_GSS, "gss" }, \ 1002 { RPC_AUTH_GSS_KRB5, "krb5" }, \ 1003 { RPC_AUTH_GSS_KRB5I, "krb5i" }, \ 1004 { RPC_AUTH_GSS_KRB5P, "krb5p" }) 1005 1006 TRACE_EVENT(nfsd_cb_setup, 1007 TP_PROTO(const struct nfs4_client *clp, 1008 const char *netid, 1009 rpc_authflavor_t authflavor 1010 ), 1011 TP_ARGS(clp, netid, authflavor), 1012 TP_STRUCT__entry( 1013 __field(u32, cl_boot) 1014 __field(u32, cl_id) 1015 __field(unsigned long, authflavor) 1016 __sockaddr(addr, clp->cl_cb_conn.cb_addrlen) 1017 __array(unsigned char, netid, 8) 1018 ), 1019 TP_fast_assign( 1020 __entry->cl_boot = clp->cl_clientid.cl_boot; 1021 __entry->cl_id = clp->cl_clientid.cl_id; 1022 strlcpy(__entry->netid, netid, sizeof(__entry->netid)); 1023 __entry->authflavor = authflavor; 1024 __assign_sockaddr(addr, &clp->cl_cb_conn.cb_addr, 1025 clp->cl_cb_conn.cb_addrlen) 1026 ), 1027 TP_printk("addr=%pISpc client %08x:%08x proto=%s flavor=%s", 1028 __get_sockaddr(addr), __entry->cl_boot, __entry->cl_id, 1029 __entry->netid, show_nfsd_authflavor(__entry->authflavor)) 1030 ); 1031 1032 TRACE_EVENT(nfsd_cb_setup_err, 1033 TP_PROTO( 1034 const struct nfs4_client *clp, 1035 long error 1036 ), 1037 TP_ARGS(clp, error), 1038 TP_STRUCT__entry( 1039 __field(long, error) 1040 __field(u32, cl_boot) 1041 __field(u32, cl_id) 1042 __sockaddr(addr, clp->cl_cb_conn.cb_addrlen) 1043 ), 1044 TP_fast_assign( 1045 __entry->error = error; 1046 __entry->cl_boot = clp->cl_clientid.cl_boot; 1047 __entry->cl_id = clp->cl_clientid.cl_id; 1048 __assign_sockaddr(addr, &clp->cl_cb_conn.cb_addr, 1049 clp->cl_cb_conn.cb_addrlen) 1050 ), 1051 TP_printk("addr=%pISpc client %08x:%08x error=%ld", 1052 __get_sockaddr(addr), __entry->cl_boot, __entry->cl_id, 1053 __entry->error) 1054 ); 1055 1056 TRACE_EVENT_CONDITION(nfsd_cb_recall, 1057 TP_PROTO( 1058 const struct nfs4_stid *stid 1059 ), 1060 TP_ARGS(stid), 1061 TP_CONDITION(stid->sc_client), 1062 TP_STRUCT__entry( 1063 __field(u32, cl_boot) 1064 __field(u32, cl_id) 1065 __field(u32, si_id) 1066 __field(u32, si_generation) 1067 __sockaddr(addr, stid->sc_client->cl_cb_conn.cb_addrlen) 1068 ), 1069 TP_fast_assign( 1070 const stateid_t *stp = &stid->sc_stateid; 1071 const struct nfs4_client *clp = stid->sc_client; 1072 1073 __entry->cl_boot = stp->si_opaque.so_clid.cl_boot; 1074 __entry->cl_id = stp->si_opaque.so_clid.cl_id; 1075 __entry->si_id = stp->si_opaque.so_id; 1076 __entry->si_generation = stp->si_generation; 1077 __assign_sockaddr(addr, &clp->cl_cb_conn.cb_addr, 1078 clp->cl_cb_conn.cb_addrlen) 1079 ), 1080 TP_printk("addr=%pISpc client %08x:%08x stateid %08x:%08x", 1081 __get_sockaddr(addr), __entry->cl_boot, __entry->cl_id, 1082 __entry->si_id, __entry->si_generation) 1083 ); 1084 1085 TRACE_EVENT(nfsd_cb_notify_lock, 1086 TP_PROTO( 1087 const struct nfs4_lockowner *lo, 1088 const struct nfsd4_blocked_lock *nbl 1089 ), 1090 TP_ARGS(lo, nbl), 1091 TP_STRUCT__entry( 1092 __field(u32, cl_boot) 1093 __field(u32, cl_id) 1094 __field(u32, fh_hash) 1095 __sockaddr(addr, lo->lo_owner.so_client->cl_cb_conn.cb_addrlen) 1096 ), 1097 TP_fast_assign( 1098 const struct nfs4_client *clp = lo->lo_owner.so_client; 1099 1100 __entry->cl_boot = clp->cl_clientid.cl_boot; 1101 __entry->cl_id = clp->cl_clientid.cl_id; 1102 __entry->fh_hash = knfsd_fh_hash(&nbl->nbl_fh); 1103 __assign_sockaddr(addr, &clp->cl_cb_conn.cb_addr, 1104 clp->cl_cb_conn.cb_addrlen) 1105 ), 1106 TP_printk("addr=%pISpc client %08x:%08x fh_hash=0x%08x", 1107 __get_sockaddr(addr), __entry->cl_boot, __entry->cl_id, 1108 __entry->fh_hash) 1109 ); 1110 1111 TRACE_EVENT(nfsd_cb_offload, 1112 TP_PROTO( 1113 const struct nfs4_client *clp, 1114 const stateid_t *stp, 1115 const struct knfsd_fh *fh, 1116 u64 count, 1117 __be32 status 1118 ), 1119 TP_ARGS(clp, stp, fh, count, status), 1120 TP_STRUCT__entry( 1121 __field(u32, cl_boot) 1122 __field(u32, cl_id) 1123 __field(u32, si_id) 1124 __field(u32, si_generation) 1125 __field(u32, fh_hash) 1126 __field(int, status) 1127 __field(u64, count) 1128 __sockaddr(addr, clp->cl_cb_conn.cb_addrlen) 1129 ), 1130 TP_fast_assign( 1131 __entry->cl_boot = stp->si_opaque.so_clid.cl_boot; 1132 __entry->cl_id = stp->si_opaque.so_clid.cl_id; 1133 __entry->si_id = stp->si_opaque.so_id; 1134 __entry->si_generation = stp->si_generation; 1135 __entry->fh_hash = knfsd_fh_hash(fh); 1136 __entry->status = be32_to_cpu(status); 1137 __entry->count = count; 1138 __assign_sockaddr(addr, &clp->cl_cb_conn.cb_addr, 1139 clp->cl_cb_conn.cb_addrlen) 1140 ), 1141 TP_printk("addr=%pISpc client %08x:%08x stateid %08x:%08x fh_hash=0x%08x count=%llu status=%d", 1142 __get_sockaddr(addr), __entry->cl_boot, __entry->cl_id, 1143 __entry->si_id, __entry->si_generation, 1144 __entry->fh_hash, __entry->count, __entry->status) 1145 ); 1146 1147 #endif /* _NFSD_TRACE_H */ 1148 1149 #undef TRACE_INCLUDE_PATH 1150 #define TRACE_INCLUDE_PATH . 1151 #define TRACE_INCLUDE_FILE trace 1152 #include <trace/define_trace.h> 1153