]> www.infradead.org Git - users/hch/misc.git/commitdiff
nfsd: add commit start/done tracepoints around nfsd_commit()
authorJeff Layton <jlayton@kernel.org>
Wed, 9 Apr 2025 14:32:23 +0000 (10:32 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 11 May 2025 23:48:26 +0000 (19:48 -0400)
Very useful for gauging how long the vfs_fsync_range() takes.

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

index a7630e9f657776a9335ba68ad223641e3ed9121a..0d49fc064f7273f32c93732a993fd77bc0783f5d 100644 (file)
@@ -451,6 +451,8 @@ DEFINE_NFSD_IO_EVENT(write_start);
 DEFINE_NFSD_IO_EVENT(write_opened);
 DEFINE_NFSD_IO_EVENT(write_io_done);
 DEFINE_NFSD_IO_EVENT(write_done);
+DEFINE_NFSD_IO_EVENT(commit_start);
+DEFINE_NFSD_IO_EVENT(commit_done);
 
 DECLARE_EVENT_CLASS(nfsd_err_class,
        TP_PROTO(struct svc_rqst *rqstp,
index 02827b0f0492d20f010151d5bd860ef509fb643f..68f7d0094b067166b0cf91b1411827333a78e2cf 100644 (file)
@@ -1343,6 +1343,8 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf,
        loff_t                  start, end;
        struct nfsd_net         *nn;
 
+       trace_nfsd_commit_start(rqstp, fhp, offset, count);
+
        /*
         * Convert the client-provided (offset, count) range to a
         * (start, end) range. If the client-provided range falls
@@ -1381,6 +1383,7 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf,
        } else
                nfsd_copy_write_verifier(verf, nn);
 
+       trace_nfsd_commit_done(rqstp, fhp, offset, count);
        return err;
 }