mirror of
https://github.com/ceph/ceph
synced 2024-12-28 22:43:29 +00:00
test: TestJournalReplay test cases need to wait for committed journal event
Fixes: http://tracker.ceph.com/issues/17566 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
parent
97aca85fc1
commit
1bdf7a425e
@ -42,14 +42,16 @@ public:
|
||||
|
||||
template<typename T>
|
||||
void inject_into_journal(librbd::ImageCtx *ictx, T event) {
|
||||
|
||||
C_SaferCond ctx;
|
||||
librbd::journal::EventEntry event_entry(event);
|
||||
librbd::Journal<>::AioObjectRequests requests;
|
||||
{
|
||||
RWLock::RLocker owner_locker(ictx->owner_lock);
|
||||
ictx->journal->append_io_event(std::move(event_entry), requests, 0, 0,
|
||||
true);
|
||||
uint64_t tid = ictx->journal->append_io_event(std::move(event_entry),
|
||||
requests, 0, 0, true);
|
||||
ictx->journal->wait_event(tid, &ctx);
|
||||
}
|
||||
ASSERT_EQ(0, ctx.wait());
|
||||
}
|
||||
|
||||
void get_journal_commit_position(librbd::ImageCtx *ictx, int64_t *tag,
|
||||
|
Loading…
Reference in New Issue
Block a user