diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2018-03-28 13:29:11 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2018-04-03 15:08:15 -0400 |
commit | 87c5942e8fae81ac296267654a047eb2db81592b (patch) | |
tree | de00193297b93692cfc86f475fe7cb6d6dbdc56a /fs/nfsd/nfs4proc.c | |
parent | d890be159a71395bd4ceca09233a8a56d7da69ee (diff) |
nfsd: Add I/O trace points in the NFSv4 read proc
NFSv4 read compound processing invokes nfsd_splice_read and
nfs_readv directly, so the trace points currently in nfsd_read are
not invoked for NFSv4 reads.
Move the NFSD READ trace points to common helpers so that NFSv4
reads are captured.
Also, record any local I/O error that occurs, the total count of
bytes that were actually returned, and whether splice or vectored
read was used.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index b773b314f599..250e0c550fd8 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -751,6 +751,9 @@ nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
751 | if (read->rd_offset >= OFFSET_MAX) | 751 | if (read->rd_offset >= OFFSET_MAX) |
752 | return nfserr_inval; | 752 | return nfserr_inval; |
753 | 753 | ||
754 | trace_nfsd_read_start(rqstp, &cstate->current_fh, | ||
755 | read->rd_offset, read->rd_length); | ||
756 | |||
754 | /* | 757 | /* |
755 | * If we do a zero copy read, then a client will see read data | 758 | * If we do a zero copy read, then a client will see read data |
756 | * that reflects the state of the file *after* performing the | 759 | * that reflects the state of the file *after* performing the |
@@ -783,6 +786,8 @@ nfsd4_read_release(union nfsd4_op_u *u) | |||
783 | { | 786 | { |
784 | if (u->read.rd_filp) | 787 | if (u->read.rd_filp) |
785 | fput(u->read.rd_filp); | 788 | fput(u->read.rd_filp); |
789 | trace_nfsd_read_done(u->read.rd_rqstp, u->read.rd_fhp, | ||
790 | u->read.rd_offset, u->read.rd_length); | ||
786 | } | 791 | } |
787 | 792 | ||
788 | static __be32 | 793 | static __be32 |