From c1a4471192bcf7e4944e2f4086a11c176e659f7b Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Thu, 20 Aug 2020 14:25:52 -0700 Subject: [PATCH] crimson/os/seastore/seastore_types: permit paddr_t::operator- to operate on block relative addrs Signed-off-by: Samuel Just --- src/crimson/os/seastore/seastore_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/crimson/os/seastore/seastore_types.h b/src/crimson/os/seastore/seastore_types.h index b1035612aeb72..2bb5a4939e1cd 100644 --- a/src/crimson/os/seastore/seastore_types.h +++ b/src/crimson/os/seastore/seastore_types.h @@ -115,7 +115,8 @@ struct paddr_t { * block_relative address. */ paddr_t operator-(paddr_t rhs) const { - assert(rhs.is_record_relative() && is_record_relative()); + assert(rhs.is_relative() && is_relative()); + assert(rhs.segment == segment); return paddr_t{ BLOCK_REL_SEG_ID, offset - rhs.offset -- 2.39.5