@@ -39,6 +39,7 @@ enum fs_type {
3939 F2FS ,
4040 BCACHEFS ,
4141 ZFS ,
42+ FUSE ,
4243};
4344
4445static struct fs_config {
@@ -94,6 +95,13 @@ static struct fs_config {
9495 [F_FSYNC ] = "zpl_fsync" ,
9596 [F_GETATTR ] = NULL , /* not supported */
9697 }},
98+ [FUSE ] = { "fuse" , {
99+ [F_READ ] = "fuse_file_read_iter" ,
100+ [F_WRITE ] = "fuse_file_write_iter" ,
101+ [F_OPEN ] = "fuse_open" ,
102+ [F_FSYNC ] = "fuse_fsync" ,
103+ [F_GETATTR ] = "fuse_getattr" ,
104+ }},
97105};
98106
99107static char * file_op_names [] = {
@@ -134,7 +142,7 @@ static const struct argp_option opts[] = {
134142 { "timestamp" , 'T' , NULL , 0 , "Print timestamp" , 0 },
135143 { "milliseconds" , 'm' , NULL , 0 , "Millisecond histogram" , 0 },
136144 { "pid" , 'p' , "PID" , 0 , "Process ID to trace" , 0 },
137- { "type" , 't' , "Filesystem" , 0 , "Which filesystem to trace, [btrfs/ext4/nfs/xfs/f2fs/bcachefs/zfs]" , 0 },
145+ { "type" , 't' , "Filesystem" , 0 , "Which filesystem to trace, [btrfs/ext4/nfs/xfs/f2fs/bcachefs/zfs/fuse ]" , 0 },
138146 { "verbose" , 'v' , NULL , 0 , "Verbose debug output" , 0 },
139147 { NULL , 'h' , NULL , OPTION_HIDDEN , "Show the full help" , 0 },
140148 {},
@@ -169,6 +177,8 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state)
169177 fs_type = BCACHEFS ;
170178 } else if (!strcmp (arg , "zfs" )) {
171179 fs_type = ZFS ;
180+ } else if (!strcmp (arg , "fuse" )) {
181+ fs_type = FUSE ;
172182 } else {
173183 warn ("invalid filesystem\n" );
174184 argp_usage (state );
@@ -229,6 +239,8 @@ static void alias_parse(char *prog)
229239 fs_type = BCACHEFS ;
230240 } else if (strstr (name , "zfsdist" )) {
231241 fs_type = ZFS ;
242+ } else if (strstr (name , "fusedist" )) {
243+ fs_type = FUSE ;
232244 }
233245}
234246
0 commit comments