]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: switch to 'osdop_read' instead of 'op_r'
authorXiubo Li <xiubli@redhat.com>
Wed, 11 Nov 2020 02:09:47 +0000 (10:09 +0800)
committerVenky Shankar <vshankar@redhat.com>
Fri, 10 Dec 2021 09:08:08 +0000 (14:38 +0530)
The 'op_r' will just acount CEPH_OSD_FLAG_READ flag, which will
include some other none real data read opcodes, like the CEPH_OSD_OP_STAT.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 4f1817aa8fd62d70e708e69aeb1ad7413498b63b)

qa/tasks/cephfs/test_readahead.py

index e936a94b9aa7ce78095b3db94432a12206dae611..28c544c649433491d026bfdf5fc301f8e2cf8b7a 100644 (file)
@@ -17,14 +17,14 @@ class TestReadahead(CephFSTestCase):
         self.mount_a.umount_wait()
         self.mount_a.mount_wait()
 
-        initial_op_r = self.mount_a.admin_socket(['perf', 'dump', 'objecter'])['objecter']['op_r']
+        initial_op_read = self.mount_a.admin_socket(['perf', 'dump', 'objecter'])['objecter']['osdop_read']
         self.mount_a.run_shell(["dd", "if=foo", "of=/dev/null", "bs=128k", "count=32"])
-        op_r = self.mount_a.admin_socket(['perf', 'dump', 'objecter'])['objecter']['op_r']
-        assert op_r >= initial_op_r
-        op_r -= initial_op_r
-        log.info("read operations: {0}".format(op_r))
+        op_read = self.mount_a.admin_socket(['perf', 'dump', 'objecter'])['objecter']['osdop_read']
+        assert op_read >= initial_op_read
+        op_read -= initial_op_read
+        log.info("read operations: {0}".format(op_read))
 
         # with exponentially increasing readahead, we should see fewer than 10 operations
         # but this test simply checks if the client is doing a remote read for each local read
-        if op_r >= 32:
+        if op_read >= 32:
             raise RuntimeError("readahead not working")