mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
Merge pull request #11480 from dillaman/wip-17566
test: TestJournalReplay test cases need to wait for event commit Reviewed-by: Venky Shankar <vshankar@redhat.com>
This commit is contained in:
commit
ebe88ca8a8
@ -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