mirror of
https://github.com/ceph/ceph
synced 2025-01-10 21:20:46 +00:00
rbd-ggate: fix compile errors from ceph::mutex update
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
This commit is contained in:
parent
79b88eaf7c
commit
7acffc19c4
@ -31,10 +31,8 @@ void Server::run() {
|
||||
dout(20) << "entering run loop" << dendl;
|
||||
|
||||
{
|
||||
std::lock_guard locker{m_lock};
|
||||
while (!m_stopping) {
|
||||
m_cond.WaitInterval(m_lock, utime_t(1, 0));
|
||||
}
|
||||
std::unique_lock locker{m_lock};
|
||||
m_cond.wait(locker, [this] { return m_stopping;});
|
||||
}
|
||||
|
||||
dout(20) << "exiting run loop" << dendl;
|
||||
@ -79,14 +77,14 @@ void Server::io_finish(IOContext *ctx) {
|
||||
|
||||
ctx->item.remove_myself();
|
||||
m_io_finished.push_back(&ctx->item);
|
||||
m_cond.Signal();
|
||||
m_cond.notify_all();
|
||||
}
|
||||
|
||||
Server::IOContext *Server::wait_io_finish() {
|
||||
dout(20) << dendl;
|
||||
|
||||
std::unique_lock locker{m_lock};
|
||||
m_cond.wait(locker, [this] { return !m_io_finished.empty() || m_stopping});
|
||||
m_cond.wait(locker, [this] { return !m_io_finished.empty() || m_stopping;});
|
||||
|
||||
if (m_io_finished.empty()) {
|
||||
return nullptr;
|
||||
@ -103,11 +101,8 @@ void Server::wait_clean() {
|
||||
|
||||
ceph_assert(!m_reader_thread.is_started());
|
||||
|
||||
std::lock_guard locker{m_lock};
|
||||
|
||||
while (!m_io_pending.empty()) {
|
||||
m_cond.Wait(m_lock);
|
||||
}
|
||||
std::unique_lock locker{m_lock};
|
||||
m_cond.wait(locker, [this] { return m_io_pending.empty();});
|
||||
|
||||
while (!m_io_finished.empty()) {
|
||||
std::unique_ptr<IOContext> free_ctx(m_io_finished.front());
|
||||
@ -166,7 +161,7 @@ void Server::reader_entry() {
|
||||
}
|
||||
std::lock_guard locker{m_lock};
|
||||
m_stopping = true;
|
||||
m_cond.Signal();
|
||||
m_cond.notify_all();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -199,7 +194,7 @@ void Server::reader_entry() {
|
||||
c->release();
|
||||
std::lock_guard locker{m_lock};
|
||||
m_stopping = true;
|
||||
m_cond.Signal();
|
||||
m_cond.notify_all();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -225,7 +220,7 @@ void Server::writer_entry() {
|
||||
derr << ctx.get() << ": send: " << cpp_strerror(r) << dendl;
|
||||
std::lock_guard locker{m_lock};
|
||||
m_stopping = true;
|
||||
m_cond.Signal();
|
||||
m_cond.notify_all();
|
||||
return;
|
||||
}
|
||||
dout(20) << ctx.get() << " finish" << dendl;
|
||||
|
Loading…
Reference in New Issue
Block a user