Solves an FTBFS when using with_interruption from pg_commands.cc:
In file included from ../src/crimson/admin/pg_commands.cc:14:
../src/crimson/common/interruptible_future.h:135:46: error: redefinition of ‘bool __tls_guard’
135 | thread_local interrupt_cond_t<InterruptCond> interrupt_cond;
| ^~~~~~~~~~~~~~
In file included from ../src/common/TrackedOp.h:18,
from ../src/os/ObjectStore.h:25,
from ../src/osd/PGLog.h:23,
from ../src/osd/PeeringState.h:19,
from ../src/crimson/osd/shard_services.h:17,
from ../src/crimson/osd/pg_shard_manager.h:10,
from ../src/crimson/osd/osd.h:23,
from ../src/crimson/admin/pg_commands.cc:16:
../src/common/StackStringStream.h:188:36: note: ‘bool __tls_guard’ previously declared here
188 | inline static thread_local Cache cache;
This matches what we already do with
interrupt_cond_t<crimson::os::seastore::TransactionConflictCondition>.
Signed-off-by: Samuel Just <sjust@redhat.com>
class TransactionConflictCondition;
}
+namespace crimson::osd {
+ class IOInterruptCondition;
+}
+
// GCC tries to instantiate
// seastar::lw_shared_ptr<crimson::os::seastore::TransactionConflictCondition>.
// but we *may* not have the definition of TransactionConflictCondition at this moment,
template <typename InterruptCond>
thread_local interrupt_cond_t<InterruptCond> interrupt_cond;
+extern template thread_local interrupt_cond_t<crimson::osd::IOInterruptCondition>
+interrupt_cond<crimson::osd::IOInterruptCondition>;
+
extern template thread_local interrupt_cond_t<crimson::os::seastore::TransactionConflictCondition>
interrupt_cond<crimson::os::seastore::TransactionConflictCondition>;
SET_SUBSYS(osd);
+namespace crimson::interruptible {
+template thread_local interrupt_cond_t<crimson::osd::IOInterruptCondition>
+interrupt_cond<crimson::osd::IOInterruptCondition>;
+}
+
namespace crimson::osd {
IOInterruptCondition::IOInterruptCondition(Ref<PG>& pg)