diff options
author | Patrick Donnelly <pdonnell@redhat.com> | 2024-08-28 05:07:00 +0200 |
---|---|---|
committer | Patrick Donnelly <pdonnell@redhat.com> | 2024-09-25 21:42:26 +0200 |
commit | b3025914374ddde29d3bb0e70214ac86288e5075 (patch) | |
tree | c39e92e72586f8998587ebb286626f48bce8cd51 /src/mds | |
parent | osdc: properly acquire locks for getters (diff) | |
download | ceph-b3025914374ddde29d3bb0e70214ac86288e5075.tar.xz ceph-b3025914374ddde29d3bb0e70214ac86288e5075.zip |
mds: use Journaler getters
To access the Journaler::Header safely.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Diffstat (limited to 'src/mds')
-rw-r--r-- | src/mds/PurgeQueue.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mds/PurgeQueue.cc b/src/mds/PurgeQueue.cc index 639c7e85277..594e8db87f8 100644 --- a/src/mds/PurgeQueue.cc +++ b/src/mds/PurgeQueue.cc @@ -225,9 +225,10 @@ void PurgeQueue::open(Context *completion) // Journaler only guarantees entries before head write_pos have been // fully flushed. Before appending new entries, we need to find and // drop any partial written entry. - if (journaler.last_committed.write_pos < journaler.get_write_pos()) { + auto&& last_committed = journaler.get_last_committed(); + if (last_committed.write_pos < journaler.get_write_pos()) { dout(4) << "recovering write_pos" << dendl; - journaler.set_read_pos(journaler.last_committed.write_pos); + journaler.set_read_pos(last_committed.write_pos); _recover(); return; } @@ -281,7 +282,8 @@ void PurgeQueue::_recover() if (journaler.get_read_pos() == journaler.get_write_pos()) { dout(4) << "write_pos recovered" << dendl; // restore original read_pos - journaler.set_read_pos(journaler.last_committed.expire_pos); + auto&& last_committed = journaler.get_last_committed(); + journaler.set_read_pos(last_committed.expire_pos); journaler.set_writeable(); recovered = true; finish_contexts(g_ceph_context, waiting_for_recovery); |