From cea9e01f5a93dc744d84ca990f4381acfcd9b246 Mon Sep 17 00:00:00 2001 From: sageweil Date: Tue, 18 Dec 2007 22:41:26 +0000 Subject: [PATCH] fixed bug with bdev barriers and no intervening ios git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2224 29311d96-e01e-0410-9327-a35deaab8ce9 --- branches/ebofs/ebofs/BlockDevice.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/branches/ebofs/ebofs/BlockDevice.cc b/branches/ebofs/ebofs/BlockDevice.cc index 6fd8990000635..57fa26b560f25 100644 --- a/branches/ebofs/ebofs/BlockDevice.cc +++ b/branches/ebofs/ebofs/BlockDevice.cc @@ -230,16 +230,17 @@ bool BlockDevice::BarrierQueue::bump() { assert(!qls.empty()); - // is the front queue empty? - if (qls.front()->empty() && - qls.front() != qls.back()) { + // is the front queue(s) empty? + bool did = false; + while (!qls.empty() && + qls.front()->empty() && + qls.front() != qls.back()) { delete qls.front(); qls.pop_front(); dout(10) << "dequeue_io front empty, moving to next queue (" << qls.front()->size() << ")" << dendl; - return true; + did = true; } - - return false; + return did; } int BlockDevice::BarrierQueue::dequeue_io(list& biols, -- 2.39.5