Bug #52511
closed[pwl ssd] flush cause io re-oreder to writeback layer
0%
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<WriteLogEntry>(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.
Updated by Deepika Upadhyay over 2 years ago
- Related to Bug #49876: [luks] sporadic failure in TestLibRBD.TestEncryptionLUKS2 added
Updated by jianpeng ma over 2 years ago
Also it will reorder write_entry and non-write_entry(discard).
Updated by Deepika Upadhyay over 2 years ago
- Status changed from New to Pending Backport
- Pull request ID set to 43127
Updated by Deepika Upadhyay over 2 years ago
- Copied to Backport #53114: pacific: [pwl ssd] flush cause io re-oreder to writeback layer added
Updated by Deepika Upadhyay over 2 years ago
- Subject changed from [pwl/ssd] flush cause io re-oreder to writeback layer to [pwl ssd] flush cause io re-oreder to writeback layer
Updated by Ilya Dryomov about 2 years ago
- Status changed from Pending Backport to Resolved
While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".