Project

General

Profile

Bug #52511

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

Added by jianpeng ma 4 months ago. Updated 3 months ago.

Status:
Pending Backport
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

Related to rbd - Bug #49876: [luks] sporadic failure in TestLibRBD.TestEncryptionLUKS2 Resolved
Copied to rbd - Backport #53114: pacific: [pwl ssd] flush cause io re-oreder to writeback layer New

History

#1 Updated by Deepika Upadhyay 4 months ago

  • Related to Bug #49876: [luks] sporadic failure in TestLibRBD.TestEncryptionLUKS2 added

#2 Updated by jianpeng ma 4 months ago

Also it will reorder write_entry and non-write_entry(discard).

#3 Updated by Deepika Upadhyay 3 months ago

  • Backport set to pacific

#4 Updated by Deepika Upadhyay 3 months ago

  • Status changed from New to Pending Backport
  • Pull request ID set to 43127

#5 Updated by Deepika Upadhyay 3 months ago

  • Copied to Backport #53114: pacific: [pwl ssd] flush cause io re-oreder to writeback layer added

#6 Updated by Deepika Upadhyay 3 months 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

Also available in: Atom PDF