Merge pull request #8132 from dillaman/wip-librbd-memcheck

librbd: correct issues discovered via valgrind memcheck

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
This commit is contained in:
Josh Durgin 2016-03-15 10:10:09 -07:00
commit 5f85c6901c
3 changed files with 6 additions and 2 deletions

View File

@ -352,7 +352,9 @@ int JournalPlayer::process_playback(uint64_t object_number) {
ObjectPlayerPtr object_player = get_object_player();
if (verify_playback_ready()) {
notify_entries_available();
} else if (!m_watch_enabled && is_object_set_ready()) {
} else if (m_watch_enabled) {
schedule_watch();
} else {
uint8_t splay_width = m_journal_metadata->get_splay_width();
uint64_t active_set = m_journal_metadata->get_active_set();
uint64_t object_set = object_player->get_object_number() / splay_width;

View File

@ -214,7 +214,8 @@ struct C_InvokeAsyncRequest : public Context {
} // anonymous namespace
template <typename I>
Operations<I>::Operations(I &image_ctx) : m_image_ctx(image_ctx) {
Operations<I>::Operations(I &image_ctx)
: m_image_ctx(image_ctx), m_async_request_seq(0) {
}
template <typename I>

View File

@ -3836,6 +3836,7 @@ TEST_F(TestLibRBD, ExclusiveLockReadTransition)
comps.pop_front();
ASSERT_EQ(0, comp->wait_for_complete());
ASSERT_EQ(1, comp->is_complete());
comp->release();
}
}