From 64ce414b022b96b7a5c73d2c03393a877b30e508 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 --- src/blk/BlockDevice.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/blk/BlockDevice.cc b/src/blk/BlockDevice.cc index c1d9d7ca9a7..99e9cce7266 100644 --- a/src/blk/BlockDevice.cc +++ b/src/blk/BlockDevice.cc @@ -73,9 +73,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