Project

General

Profile

Actions

Bug #52511

closed

[pwl ssd] flush cause io re-oreder to writeback layer

Added by jianpeng ma over 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

consider this workload:
writeA(0,4K)
writeB(0,512).

ssd can make sure writeA, writeB order in cache file. But when flush to osd, it will firstly read cache data and then flush to osd.
Although it keep order when send read op. But it use aio_read, so we can't keep the order of aio_read.
Context* WriteLog<I>::construct_flush_entry_ctx(
std::shared_ptr<GenericLogEntry> log_entry) {
// snapshot so we behave consistently
bool invalidating = this->m_invalidating;

Context *ctx = this->construct_flush_entry(log_entry, invalidating);
if (invalidating) {
return ctx;
}
if (log_entry->is_write_entry()) {
bufferlist *read_bl_ptr = new bufferlist;
ctx = new LambdaContext(
[this, log_entry, read_bl_ptr, ctx](int r) {
bufferlist captured_entry_bl;
captured_entry_bl.claim_append(*read_bl_ptr);
delete read_bl_ptr;
m_image_ctx.op_work_queue->queue(new LambdaContext(
[this, log_entry, entry_bl=move(captured_entry_bl), ctx](int r) {
auto captured_entry_bl = std::move(entry_bl);
ldout(m_image_ctx.cct, 15) << "flushing:" << log_entry
<< " " << *log_entry << dendl;
log_entry->writeback_bl(this->m_image_writeback, ctx,
std::move(captured_entry_bl));
}), 0);
});
ctx = new LambdaContext(
[this, log_entry, read_bl_ptr, ctx](int r) {
auto write_entry = static_pointer_cast&lt;WriteLogEntry&gt;(log_entry);
write_entry->inc_bl_refs();
aio_read_data_block(std::move(write_entry), read_bl_ptr, ctx);
});
return ctx;

If read_cache_data(writeB) firstly arrived before read_cache_data(writeB). The send later layer order is: writeB, writeA.
This mabye be bug.

https://tracker.ceph.com/issues/49876 is the example.


Related issues 2 (0 open2 closed)

Related to rbd - Bug #49876: [luks] sporadic failure in TestLibRBD.TestEncryptionLUKS2Resolved

Actions
Copied to rbd - Backport #53114: pacific: [pwl ssd] flush cause io re-oreder to writeback layerResolvedDeepika UpadhyayActions
Actions

Also available in: Atom PDF