From 71d4afd36a6a8ec4ada79f67dbb76eef785cee0e 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) --- 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 832f6b85393f..db5aecd7545b 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.47.3