1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
#!/usr/bin/env stap
global _putfh_cstate, _putrootfh_cstate, pseudoroot_cstate
probe module("nfsd").function("nfsd4_putrootfh")
{
_putrootfh_cstate = $cstate;
}
probe module("nfsd").function("nfsd4_putrootfh").return
{
if ($return) {
printf("nfsd4_putrootfh: %s\n", nfsderror($return));
} else {
printf("nfsd4_putrootfh: %s\n", cstate_pr(_putrootfh_cstate));
}
}
probe module("nfsd").function("exp_pseudoroot")
{
/*
printf("exp_pseudoroot: rqstp %p fhp %p\n", $rqstp, $fhp);
*/
pseudoroot_cstate = $fhp;
}
probe module("nfsd").function("exp_pseudoroot").return
{
if ($return) {
printf("exp_pseudoroot: %s\n", nfsderror($return));
} else {
printf("exp_pseudoroot: %s\n", svcfhfmt(pseudoroot_cstate));
}
}
probe module("nfsd").function("nfsd4_putfh")
{
printf("nfsd4_putfh: rqstp %p cstate %p putfh %p\n",
$rqstp, $cstate, $putfh);
_putfh_cstate = $cstate;
}
probe module("nfsd").function("nfsd4_putfh").return
{
if ($return) {
printf("nfsd4_putfh: %s\n", nfsderror($return));
} else {
printf("nfsd4_putfh: %s\n", cstate_pr(_putfh_cstate));
}
}
probe module("nfsd").function("nfsd4_getfh")
{
printf("nfsd4_getfh: rqstp %p cstate %p \n", $rqstp, $cstate);
printf(" %s\n", cstate_pr($cstate));
}
probe module("nfsd").function("nfsd4_getfh").return
{
printf("nfsd4_getfh: %s\n", nfsderror($return));
}
probe module("nfsd").function("fh_verify")
{
printf(" fh_verify: rqstp %p fhp %p type %d access %d\n",
$rqstp, $fhp, $type, $access);
printf(" %s\n", svcfhfmt($fhp));
}
probe module("nfsd").function("fh_verify").return
{
printf(" fh_verify: %s\n", nfsderror($return));
}
probe module("nfsd").function("fh_compose")
{
printf(" fh_compose: fhp %p exp %p dentry %p ref_fh %p\n",
$fhp, $exp, $dentry, $ref_fh);
printf(" : %s\n", svc_export_dump($exp));
}
probe module("nfsd").function("fh_compose").return
{
printf(" fh_compose: %s\n", nfsderror($return));
}
probe module("nfsd").function("rqst_exp_find")
{
printf(" rqst_exp_find: rqstp %p fsid_type %d fsidv %p\n",
$rqstp, $fsid_type, $fsidv);
}
probe module("nfsd").function("rqst_exp_find").return
{
if ($return != 0)
printf(" rqst_exp_find: %p\n", $return);
}
/*
probe module("nfsd").function("exp_find_key").return
{
printf("exp_find_key: %p\n", $return);
}
probe module("nfsd").function("exp_get_by_name").return
{
printf("exp_get_by_name: %p\n", $return);
}
probe module("nfsd").function("svc_expkey_lookup").return
{
printf("svc_expkey_lookup: %p\n", $return);
}
*/
probe begin { log("starting nfsd_fh probe") }
probe end { log("ending nfsd_fh probe") }
|