diff options
author | David Howells <dhowells@redhat.com> | 2018-04-06 15:17:26 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2018-04-09 22:54:48 +0200 |
commit | 76a5cb6fc1e22a2a316fb690fc4cdd5121d1c0ff (patch) | |
tree | 46916422df7fc81adfdf0eeec0491398cff2d8fb /fs/afs/write.c | |
parent | afs: Trace protocol errors (diff) | |
download | linux-76a5cb6fc1e22a2a316fb690fc4cdd5121d1c0ff.tar.xz linux-76a5cb6fc1e22a2a316fb690fc4cdd5121d1c0ff.zip |
afs: Add stats for data transfer operations
Add statistics to /proc/fs/afs/stats for data transfer RPC operations. New
lines are added that look like:
file-rd : n=55794 nb=10252282150
file-wr : n=9789 nb=3247763645
where n= indicates the number of ops completed and nb= indicates the number
of bytes successfully transferred. file-rd is the counts for read/fetch
operations and file-wr the counts for write/store operations.
Note that directory and symlink downloading are included in the file-rd
stats at the moment.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/write.c')
-rw-r--r-- | fs/afs/write.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/afs/write.c b/fs/afs/write.c index 70a563c14e6f..eccc16198f68 100644 --- a/fs/afs/write.c +++ b/fs/afs/write.c @@ -356,6 +356,12 @@ found_key: } switch (ret) { + case 0: + afs_stat_v(vnode, n_stores); + atomic_long_add((last * PAGE_SIZE + to) - + (first * PAGE_SIZE + offset), + &afs_v2net(vnode)->n_store_bytes); + break; case -EACCES: case -EPERM: case -ENOKEY: |