summaryrefslogtreecommitdiffstats
path: root/src/osdc/Journaler.h
diff options
context:
space:
mode:
authorPatrick Donnelly <pdonnell@redhat.com>2024-09-27 14:13:23 +0200
committerPatrick Donnelly <pdonnell@redhat.com>2024-09-27 14:16:32 +0200
commit59e39d11779e346cbd64d99e3ba77b9f50ebd91e (patch)
treeae0b4e85b9672c709e2e24fc26f7d20c84a6723e /src/osdc/Journaler.h
parentMerge pull request #59539 from zdover23/wip-doc-2024-08-31-add-squid-19-2-0-r... (diff)
downloadceph-59e39d11779e346cbd64d99e3ba77b9f50ebd91e.tar.xz
ceph-59e39d11779e346cbd64d99e3ba77b9f50ebd91e.zip
osdc: fix mutex assert for !debug builds
Fixes: 55652f0819761d410bddcf3688b1c3e10ed64f5b Fixes: https://tracker.ceph.com/issues/68291 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Diffstat (limited to '')
-rw-r--r--src/osdc/Journaler.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/osdc/Journaler.h b/src/osdc/Journaler.h
index 5e1677de7c0..4a574ed66d9 100644
--- a/src/osdc/Journaler.h
+++ b/src/osdc/Journaler.h
@@ -529,43 +529,43 @@ public:
// ===================
Header get_last_committed() const {
- ceph_assert(!ceph_mutex_is_locked_by_me(lock));
+ ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));
lock_guard l(lock);
return last_committed;
}
Header get_last_written() const {
- ceph_assert(!ceph_mutex_is_locked_by_me(lock));
+ ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));
lock_guard l(lock);
return last_written;
}
uint64_t get_layout_period() const {
- ceph_assert(!ceph_mutex_is_locked_by_me(lock));
+ ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));
lock_guard l(lock);
return layout.get_period();
}
file_layout_t get_layout() const {
- ceph_assert(!ceph_mutex_is_locked_by_me(lock));
+ ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));
lock_guard l(lock);
return layout;
}
bool is_active() const {
- ceph_assert(!ceph_mutex_is_locked_by_me(lock));
+ ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));
lock_guard l(lock);
return state == STATE_ACTIVE;
}
bool is_stopping() const {
- ceph_assert(!ceph_mutex_is_locked_by_me(lock));
+ ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));
lock_guard l(lock);
return state == STATE_STOPPING;
}
int get_error() const {
- ceph_assert(!ceph_mutex_is_locked_by_me(lock));
+ ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));
lock_guard l(lock);
return error;
}
bool is_readonly() const {
- ceph_assert(!ceph_mutex_is_locked_by_me(lock));
+ ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));
lock_guard l(lock);
return readonly;
}
@@ -573,32 +573,32 @@ public:
bool _is_readable();
bool try_read_entry(bufferlist& bl);
uint64_t get_write_pos() const {
- ceph_assert(!ceph_mutex_is_locked_by_me(lock));
+ ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));
lock_guard l(lock);
return write_pos;
}
uint64_t get_write_safe_pos() const {
- ceph_assert(!ceph_mutex_is_locked_by_me(lock));
+ ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));
lock_guard l(lock);
return safe_pos;
}
uint64_t get_read_pos() const {
- ceph_assert(!ceph_mutex_is_locked_by_me(lock));
+ ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));
lock_guard l(lock);
return read_pos;
}
uint64_t get_expire_pos() const {
- ceph_assert(!ceph_mutex_is_locked_by_me(lock));
+ ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));
lock_guard l(lock);
return expire_pos;
}
uint64_t get_trimmed_pos() const {
- ceph_assert(!ceph_mutex_is_locked_by_me(lock));
+ ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));
lock_guard l(lock);
return trimmed_pos;
}
size_t get_journal_envelope_size() const {
- ceph_assert(!ceph_mutex_is_locked_by_me(lock));
+ ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));
lock_guard l(lock);
return journal_stream.get_envelope_size();
}