From 4bc64de8eabfd3b23cb9646d04d5f66bc241eb98 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Fri, 28 Aug 2020 01:53:41 -0700 Subject: [PATCH] crimson/os/seastore/journal: use metadata size for block base rather than assuming one block Uncaught because it's rare for the metadata prefix to exceed 4k. Signed-off-by: Samuel Just --- src/crimson/os/seastore/journal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crimson/os/seastore/journal.h b/src/crimson/os/seastore/journal.h index ce42bbba03578..83234fc8c4466 100644 --- a/src/crimson/os/seastore/journal.h +++ b/src/crimson/os/seastore/journal.h @@ -150,9 +150,9 @@ public: return roll.safe_then( [this, rsize, record=std::move(record)]() mutable { return write_record(rsize, std::move(record) - ).safe_then([this](auto addr) { + ).safe_then([this, rsize](auto addr) { return std::make_pair( - addr.add_offset(block_size), + addr.add_offset(rsize.mdlength), get_journal_seq(addr)); }); }); -- 2.39.5