summaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
authorLuís Henriques <lhenriques@suse.de>2021-11-04 12:31:47 +0000
committerIlya Dryomov <idryomov@gmail.com>2021-11-08 03:29:52 +0100
commitc02cb7bdc4501debc3e71a4d2daf7286c48e1d38 (patch)
tree662e8a26150a6ca3f9edefb009eaf1a1b484f31d /fs/ceph/file.c
parentaca39d9e86f3edeaac5d2c467f5fd31e0b0df606 (diff)
downloadlinux-c02cb7bdc4501debc3e71a4d2daf7286c48e1d38.tar.bz2
ceph: add a new metric to keep track of remote object copies
This patch adds latency and size metrics for remote object copies operations ("copyfrom"). For now, these metrics will be available on the client only, they won't be sent to the MDS. Signed-off-by: Luís Henriques <lhenriques@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r--fs/ceph/file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 6c77f203e7b5..220a41831b46 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -2304,6 +2304,10 @@ static ssize_t ceph_do_objects_copy(struct ceph_inode_info *src_ci, u64 *src_off
else {
ceph_osdc_start_request(osdc, req, false);
ret = ceph_osdc_wait_request(osdc, req);
+ ceph_update_copyfrom_metrics(&fsc->mdsc->metric,
+ req->r_start_latency,
+ req->r_end_latency,
+ object_size, ret);
ceph_osdc_put_request(req);
}
if (ret) {