NFSD: Add an nfsd_file_fsync tracepoint
authorChuck Lever <chuck.lever@oracle.com>
Thu, 3 Nov 2022 20:22:48 +0000 (16:22 -0400)
committerChuck Lever <cel@kernel.org>
Sat, 10 Dec 2022 16:00:04 +0000 (11:00 -0500)
commitd7064eaf688cfe454c50db9f59298463d80d403c
tree7029852beb52f4fed075104f4f8ab2ec9e99744d
parent3ed157d0d73f15b6574424dd068ca5f5a8560562
NFSD: Add an nfsd_file_fsync tracepoint

Add a tracepoint to capture the number of filecache-triggered fsync
calls and which files needed it. Also, record when an fsync triggers
a write verifier reset.

Examples:

<...>-97    [007]   262.505611: nfsd_file_free:       inode=0xffff888171e08140 ref=0 flags=GC may=WRITE nf_file=0xffff8881373d2400
<...>-97    [007]   262.505612: nfsd_file_fsync:      inode=0xffff888171e08140 ref=0 flags=GC may=WRITE nf_file=0xffff8881373d2400 ret=0
<...>-97    [007]   262.505623: nfsd_file_free:       inode=0xffff888171e08dc0 ref=0 flags=GC may=WRITE nf_file=0xffff8881373d1e00
<...>-97    [007]   262.505624: nfsd_file_fsync:      inode=0xffff888171e08dc0 ref=0 flags=GC may=WRITE nf_file=0xffff8881373d1e00 ret=0

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
fs/nfsd/filecache.c
fs/nfsd/trace.h