From: Mykola Golub Date: Fri, 15 Mar 2019 15:17:42 +0000 (+0000) Subject: librbd: when requeueing QOS throttled request queue it back X-Git-Tag: v14.2.2~149^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F28120%2Fhead;p=ceph.git librbd: when requeueing QOS throttled request queue it back to preserve order of throttled requests, which is important for flush. Signed-off-by: Mykola Golub (cherry picked from commit 633a167ff04b1f9af6acde41f279c525b3ce87f3) --- diff --git a/src/librbd/io/ImageRequestWQ.cc b/src/librbd/io/ImageRequestWQ.cc index a5101aa048438..70e6aae9c91c3 100644 --- a/src/librbd/io/ImageRequestWQ.cc +++ b/src/librbd/io/ImageRequestWQ.cc @@ -661,7 +661,7 @@ void ImageRequestWQ::handle_throttle_ready(int r, ImageDispatchSpec *item, ceph_assert(m_io_throttled.load() > 0); item->set_throttled(flag); if (item->were_all_throttled()) { - this->requeue_front(item); + this->requeue_back(item); --m_io_throttled; this->signal(); } diff --git a/src/test/librbd/io/test_mock_ImageRequestWQ.cc b/src/test/librbd/io/test_mock_ImageRequestWQ.cc index 352b888d3996b..50daa83c777bc 100644 --- a/src/test/librbd/io/test_mock_ImageRequestWQ.cc +++ b/src/test/librbd/io/test_mock_ImageRequestWQ.cc @@ -105,6 +105,7 @@ struct ThreadPool::PointerWQ