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 #1

Updated by Deepika Upadhyay over 2 years ago

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

Updated by jianpeng ma over 2 years ago

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

Actions #3

Updated by Deepika Upadhyay over 2 years ago

  • Backport set to pacific
Actions #4

Updated by Deepika Upadhyay over 2 years ago

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

Updated by Deepika Upadhyay over 2 years ago

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

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
Actions #7

Updated by Ilya Dryomov about 2 years ago

  • Assignee set to jianpeng ma
Actions #8

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".

Actions

Also available in: Atom PDF