From 67199b11a88b61ebfd69afffa3fe2f86c051a874 Mon Sep 17 00:00:00 2001 From: weixinwei Date: Fri, 29 May 2020 22:43:31 +0800 Subject: [PATCH] blk:BlockDevice.cc: use pending_aios instead of iovec size as ios num Signed-off-by: weixinwei (cherry picked from commit 64ce414b022b96b7a5c73d2c03393a877b30e508) Conflicts: src/blk/BlockDevice.cc - file does not exist in Nautilus; made the changes manually in src/os/bluestore/BlockDevice.cc --- src/os/bluestore/BlockDevice.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/os/bluestore/BlockDevice.cc b/src/os/bluestore/BlockDevice.cc index bba9a96cd6808..edfc2fb9c8453 100644 --- a/src/os/bluestore/BlockDevice.cc +++ b/src/os/bluestore/BlockDevice.cc @@ -64,9 +64,7 @@ uint64_t IOContext::get_num_ios() const // that to the bytes value. uint64_t ios = 0; #if defined(HAVE_LIBAIO) || defined(HAVE_POSIXAIO) - for (auto& p : pending_aios) { - ios += p.iov.size(); - } + ios += pending_aios.size(); #endif #ifdef HAVE_SPDK ios += total_nseg; -- 2.39.5