From 4fdc49bdc7aa5bf353989407e6134840fdfd62f2 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sat, 17 Jun 2023 00:02:34 +0300 Subject: [PATCH] Add another assert-type check (it does not fire, just as a safety measure for the future) --- src/blockstore_stable.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/blockstore_stable.cpp b/src/blockstore_stable.cpp index 003d3197..aa857f9a 100644 --- a/src/blockstore_stable.cpp +++ b/src/blockstore_stable.cpp @@ -458,6 +458,16 @@ void blockstore_impl_t::mark_stable(const obj_ver_id & v, bool forget_dirty) big_to_flush++; } } + else if (IS_IN_FLIGHT(dirty_it->second.state)) + { + // mark_stable should never be called for in-flight or submitted writes + printf( + "BUG: Attempt to mark_stable object %lx:%lx v%lu state of which is %x\n", + dirty_it->first.oid.inode, dirty_it->first.oid.stripe, dirty_it->first.version, + dirty_it->second.state + ); + exit(1); + } if (forget_dirty && (IS_BIG_WRITE(dirty_it->second.state) || IS_DELETE(dirty_it->second.state))) {