From b4fc7b520a6fbef90faa70527bc8b72ee08df01d Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 6 Sep 2018 10:08:41 -0400 Subject: [PATCH] librbd: fix improper indentation of 'ceph_assert' statements Signed-off-by: Jason Dillaman --- src/librbd/ImageWatcher.cc | 24 ++++++++--------- src/librbd/Journal.cc | 11 ++++---- src/librbd/ManagedLock.cc | 6 ++--- src/librbd/ObjectMap.cc | 13 +++++----- src/librbd/Operations.cc | 26 +++++++++---------- src/librbd/image/RefreshRequest.cc | 7 ++--- src/librbd/internal.cc | 2 +- src/librbd/journal/Replay.cc | 10 +++---- src/librbd/operation/ObjectMapIterate.cc | 2 +- .../operation/RebuildObjectMapRequest.cc | 8 +++--- src/librbd/operation/ResizeRequest.cc | 6 ++--- src/librbd/operation/SnapshotCreateRequest.cc | 4 +-- src/librbd/operation/TrimRequest.cc | 6 ++--- 13 files changed, 64 insertions(+), 61 deletions(-) diff --git a/src/librbd/ImageWatcher.cc b/src/librbd/ImageWatcher.cc index 8575cd05af9..cfa08173d65 100644 --- a/src/librbd/ImageWatcher.cc +++ b/src/librbd/ImageWatcher.cc @@ -167,7 +167,7 @@ void ImageWatcher::notify_flatten(uint64_t request_id, Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock && - !m_image_ctx.exclusive_lock->is_lock_owner()); + !m_image_ctx.exclusive_lock->is_lock_owner()); AsyncRequestId async_request_id(get_client_id(), request_id); @@ -182,7 +182,7 @@ void ImageWatcher::notify_resize(uint64_t request_id, uint64_t size, Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock && - !m_image_ctx.exclusive_lock->is_lock_owner()); + !m_image_ctx.exclusive_lock->is_lock_owner()); AsyncRequestId async_request_id(get_client_id(), request_id); @@ -197,7 +197,7 @@ void ImageWatcher::notify_snap_create(const cls::rbd::SnapshotNamespace &snap Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock && - !m_image_ctx.exclusive_lock->is_lock_owner()); + !m_image_ctx.exclusive_lock->is_lock_owner()); notify_lock_owner(SnapCreatePayload(snap_namespace, snap_name), on_finish); } @@ -208,7 +208,7 @@ void ImageWatcher::notify_snap_rename(const snapid_t &src_snap_id, Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock && - !m_image_ctx.exclusive_lock->is_lock_owner()); + !m_image_ctx.exclusive_lock->is_lock_owner()); notify_lock_owner(SnapRenamePayload(src_snap_id, dst_snap_name), on_finish); } @@ -219,7 +219,7 @@ void ImageWatcher::notify_snap_remove(const cls::rbd::SnapshotNamespace &snap Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock && - !m_image_ctx.exclusive_lock->is_lock_owner()); + !m_image_ctx.exclusive_lock->is_lock_owner()); notify_lock_owner(SnapRemovePayload(snap_namespace, snap_name), on_finish); } @@ -230,7 +230,7 @@ void ImageWatcher::notify_snap_protect(const cls::rbd::SnapshotNamespace &sna Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock && - !m_image_ctx.exclusive_lock->is_lock_owner()); + !m_image_ctx.exclusive_lock->is_lock_owner()); notify_lock_owner(SnapProtectPayload(snap_namespace, snap_name), on_finish); } @@ -241,7 +241,7 @@ void ImageWatcher::notify_snap_unprotect(const cls::rbd::SnapshotNamespace &s Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock && - !m_image_ctx.exclusive_lock->is_lock_owner()); + !m_image_ctx.exclusive_lock->is_lock_owner()); notify_lock_owner(SnapUnprotectPayload(snap_namespace, snap_name), on_finish); } @@ -252,7 +252,7 @@ void ImageWatcher::notify_rebuild_object_map(uint64_t request_id, Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock && - !m_image_ctx.exclusive_lock->is_lock_owner()); + !m_image_ctx.exclusive_lock->is_lock_owner()); AsyncRequestId async_request_id(get_client_id(), request_id); @@ -266,7 +266,7 @@ void ImageWatcher::notify_rename(const std::string &image_name, Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock && - !m_image_ctx.exclusive_lock->is_lock_owner()); + !m_image_ctx.exclusive_lock->is_lock_owner()); notify_lock_owner(RenamePayload(image_name), on_finish); } @@ -276,7 +276,7 @@ void ImageWatcher::notify_update_features(uint64_t features, bool enabled, Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock && - !m_image_ctx.exclusive_lock->is_lock_owner()); + !m_image_ctx.exclusive_lock->is_lock_owner()); notify_lock_owner(UpdateFeaturesPayload(features, enabled), on_finish); } @@ -287,7 +287,7 @@ void ImageWatcher::notify_migrate(uint64_t request_id, Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock && - !m_image_ctx.exclusive_lock->is_lock_owner()); + !m_image_ctx.exclusive_lock->is_lock_owner()); AsyncRequestId async_request_id(get_client_id(), request_id); @@ -378,7 +378,7 @@ void ImageWatcher::schedule_request_lock(bool use_timer, int timer_delay) { return; } ceph_assert(m_image_ctx.exclusive_lock && - !m_image_ctx.exclusive_lock->is_lock_owner()); + !m_image_ctx.exclusive_lock->is_lock_owner()); RWLock::RLocker watch_locker(this->m_watch_lock); if (this->is_registered(this->m_watch_lock)) { diff --git a/src/librbd/Journal.cc b/src/librbd/Journal.cc index 6ff84335093..a74cfb4c510 100644 --- a/src/librbd/Journal.cc +++ b/src/librbd/Journal.cc @@ -1116,7 +1116,7 @@ void Journal::recreate_journaler(int r) { ceph_assert(m_lock.is_locked()); ceph_assert(m_state == STATE_FLUSHING_RESTART || - m_state == STATE_FLUSHING_REPLAY); + m_state == STATE_FLUSHING_REPLAY); delete m_journal_replay; m_journal_replay = NULL; @@ -1267,7 +1267,7 @@ void Journal::handle_replay_complete(int r) { { Mutex::Locker locker(m_lock); ceph_assert(m_state == STATE_FLUSHING_RESTART || - m_state == STATE_FLUSHING_REPLAY); + m_state == STATE_FLUSHING_REPLAY); state = m_state; } @@ -1310,8 +1310,8 @@ void Journal::handle_replay_process_safe(ReplayEntry replay_entry, int r) { m_lock.Lock(); ceph_assert(m_state == STATE_REPLAYING || - m_state == STATE_FLUSHING_RESTART || - m_state == STATE_FLUSHING_REPLAY); + m_state == STATE_FLUSHING_RESTART || + m_state == STATE_FLUSHING_REPLAY); ldout(cct, 20) << this << " " << __func__ << ": r=" << r << dendl; if (r < 0) { @@ -1382,7 +1382,8 @@ void Journal::handle_flushing_replay() { CephContext *cct = m_image_ctx.cct; ldout(cct, 20) << this << " " << __func__ << dendl; - ceph_assert(m_state == STATE_FLUSHING_REPLAY || m_state == STATE_FLUSHING_RESTART); + ceph_assert(m_state == STATE_FLUSHING_REPLAY || + m_state == STATE_FLUSHING_RESTART); if (m_close_pending) { destroy_journaler(0); return; diff --git a/src/librbd/ManagedLock.cc b/src/librbd/ManagedLock.cc index 8f62ff15fe3..433c5964471 100644 --- a/src/librbd/ManagedLock.cc +++ b/src/librbd/ManagedLock.cc @@ -81,7 +81,7 @@ template ManagedLock::~ManagedLock() { Mutex::Locker locker(m_lock); ceph_assert(m_state == STATE_SHUTDOWN || m_state == STATE_UNLOCKED || - m_state == STATE_UNINITIALIZED); + m_state == STATE_UNINITIALIZED); if (m_state == STATE_UNINITIALIZED) { // never initialized -- ensure any in-flight ops are complete // since we wouldn't expect shut_down to be invoked @@ -135,7 +135,7 @@ void ManagedLock::shut_down(Context *on_shut_down) { ldout(m_cct, 10) << "woke up waiting acquire" << dendl; Action active_action = get_active_action(); ceph_assert(active_action == ACTION_TRY_LOCK || - active_action == ACTION_ACQUIRE_LOCK); + active_action == ACTION_ACQUIRE_LOCK); complete_active_action(STATE_UNLOCKED, -ESHUTDOWN); } @@ -209,7 +209,7 @@ void ManagedLock::reacquire_lock(Context *on_reacquired) { ldout(m_cct, 10) << "woke up waiting acquire" << dendl; Action active_action = get_active_action(); ceph_assert(active_action == ACTION_TRY_LOCK || - active_action == ACTION_ACQUIRE_LOCK); + active_action == ACTION_ACQUIRE_LOCK); execute_next_action(); } else if (!is_state_shutdown() && (m_state == STATE_LOCKED || diff --git a/src/librbd/ObjectMap.cc b/src/librbd/ObjectMap.cc index 041f287410e..870049be71d 100644 --- a/src/librbd/ObjectMap.cc +++ b/src/librbd/ObjectMap.cc @@ -174,7 +174,7 @@ bool ObjectMap::set_object_map(ceph::BitVector<2> &target_object_map) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.snap_lock.is_locked()); ceph_assert(m_image_ctx.test_features(RBD_FEATURE_OBJECT_MAP, - m_image_ctx.snap_lock)); + m_image_ctx.snap_lock)); RWLock::RLocker object_map_locker(m_image_ctx.object_map_lock); m_object_map = target_object_map; return true; @@ -219,7 +219,7 @@ void ObjectMap::aio_save(Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.snap_lock.is_locked()); ceph_assert(m_image_ctx.test_features(RBD_FEATURE_OBJECT_MAP, - m_image_ctx.snap_lock)); + m_image_ctx.snap_lock)); RWLock::RLocker object_map_locker(m_image_ctx.object_map_lock); librados::ObjectWriteOperation op; @@ -242,10 +242,10 @@ void ObjectMap::aio_resize(uint64_t new_size, uint8_t default_object_state, ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.snap_lock.is_locked()); ceph_assert(m_image_ctx.test_features(RBD_FEATURE_OBJECT_MAP, - m_image_ctx.snap_lock)); + m_image_ctx.snap_lock)); ceph_assert(m_image_ctx.image_watcher != NULL); ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); object_map::ResizeRequest *req = new object_map::ResizeRequest( m_image_ctx, &m_object_map, m_snap_id, new_size, default_object_state, @@ -319,8 +319,9 @@ void ObjectMap::aio_update(uint64_t snap_id, uint64_t start_object_no, ceph_assert((m_image_ctx.features & RBD_FEATURE_OBJECT_MAP) != 0); ceph_assert(m_image_ctx.image_watcher != nullptr); ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); - ceph_assert(snap_id != CEPH_NOSNAP || m_image_ctx.object_map_lock.is_wlocked()); + m_image_ctx.exclusive_lock->is_lock_owner()); + ceph_assert(snap_id != CEPH_NOSNAP || + m_image_ctx.object_map_lock.is_wlocked()); ceph_assert(start_object_no < end_object_no); CephContext *cct = m_image_ctx.cct; diff --git a/src/librbd/Operations.cc b/src/librbd/Operations.cc index e670b8523fb..4940bffd9a0 100644 --- a/src/librbd/Operations.cc +++ b/src/librbd/Operations.cc @@ -372,7 +372,7 @@ void Operations::execute_flatten(ProgressContext &prog_ctx, Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); CephContext *cct = m_image_ctx.cct; ldout(cct, 20) << "flatten" << dendl; @@ -450,7 +450,7 @@ void Operations::execute_rebuild_object_map(ProgressContext &prog_ctx, Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); CephContext *cct = m_image_ctx.cct; ldout(cct, 5) << this << " " << __func__ << dendl; @@ -497,7 +497,7 @@ void Operations::object_map_iterate(ProgressContext &prog_ctx, Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); if (!m_image_ctx.test_features(RBD_FEATURE_OBJECT_MAP)) { on_finish->complete(-EINVAL); @@ -566,7 +566,7 @@ void Operations::execute_rename(const std::string &dest_name, ceph_assert(m_image_ctx.owner_lock.is_locked()); if (m_image_ctx.test_features(RBD_FEATURE_JOURNALING)) { ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); } if (m_image_ctx.operations_disabled) { @@ -649,7 +649,7 @@ void Operations::execute_resize(uint64_t size, bool allow_shrink, ProgressCon uint64_t journal_op_tid) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); CephContext *cct = m_image_ctx.cct; m_image_ctx.snap_lock.get_read(); @@ -740,7 +740,7 @@ void Operations::execute_snap_create(const cls::rbd::SnapshotNamespace &snap_ bool skip_object_map) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); CephContext *cct = m_image_ctx.cct; ldout(cct, 5) << this << " " << __func__ << ": snap_name=" << snap_name @@ -922,7 +922,7 @@ void Operations::execute_snap_remove(const cls::rbd::SnapshotNamespace& snap_ { if ((m_image_ctx.features & RBD_FEATURE_FAST_DIFF) != 0) { ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); } } @@ -1026,7 +1026,7 @@ void Operations::execute_snap_rename(const uint64_t src_snap_id, ceph_assert(m_image_ctx.owner_lock.is_locked()); if ((m_image_ctx.features & RBD_FEATURE_JOURNALING) != 0) { ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); } if (m_image_ctx.operations_disabled) { @@ -1123,7 +1123,7 @@ void Operations::execute_snap_protect(const cls::rbd::SnapshotNamespace& snap ceph_assert(m_image_ctx.owner_lock.is_locked()); if (m_image_ctx.test_features(RBD_FEATURE_JOURNALING)) { ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); } if (m_image_ctx.operations_disabled) { @@ -1218,7 +1218,7 @@ void Operations::execute_snap_unprotect(const cls::rbd::SnapshotNamespace& sn ceph_assert(m_image_ctx.owner_lock.is_locked()); if (m_image_ctx.test_features(RBD_FEATURE_JOURNALING)) { ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); } if (m_image_ctx.operations_disabled) { @@ -1399,7 +1399,7 @@ void Operations::execute_update_features(uint64_t features, bool enabled, uint64_t journal_op_tid) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); CephContext *cct = m_image_ctx.cct; ldout(cct, 5) << this << " " << __func__ << ": features=" << features @@ -1598,7 +1598,7 @@ void Operations::execute_migrate(ProgressContext &prog_ctx, Context *on_finish) { ceph_assert(m_image_ctx.owner_lock.is_locked()); ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); CephContext *cct = m_image_ctx.cct; ldout(cct, 20) << "migrate" << dendl; @@ -1637,7 +1637,7 @@ void Operations::execute_migrate(ProgressContext &prog_ctx, template int Operations::prepare_image_update(bool request_lock) { ceph_assert(m_image_ctx.owner_lock.is_locked() && - !m_image_ctx.owner_lock.is_wlocked()); + !m_image_ctx.owner_lock.is_wlocked()); if (m_image_ctx.image_watcher == nullptr) { return -EROFS; } diff --git a/src/librbd/image/RefreshRequest.cc b/src/librbd/image/RefreshRequest.cc index 4cdb74f68e2..3c4212f005f 100644 --- a/src/librbd/image/RefreshRequest.cc +++ b/src/librbd/image/RefreshRequest.cc @@ -1387,9 +1387,10 @@ bool RefreshRequest::get_migration_info(ParentImageInfo *parent_md, if (m_migration_spec.header_type != cls::rbd::MIGRATION_HEADER_TYPE_DST || (m_migration_spec.state != cls::rbd::MIGRATION_STATE_PREPARED && m_migration_spec.state != cls::rbd::MIGRATION_STATE_EXECUTING)) { - ceph_assert(m_migration_spec.header_type == cls::rbd::MIGRATION_HEADER_TYPE_SRC || - m_migration_spec.pool_id == -1 || - m_migration_spec.state == cls::rbd::MIGRATION_STATE_EXECUTED); + ceph_assert(m_migration_spec.header_type == + cls::rbd::MIGRATION_HEADER_TYPE_SRC || + m_migration_spec.pool_id == -1 || + m_migration_spec.state == cls::rbd::MIGRATION_STATE_EXECUTED); return false; } diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index f7eec3c4d69..88271739cc2 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -213,7 +213,7 @@ bool compare_by_name(const child_info_t& c1, const child_info_t& c2) { ceph_assert(ictx->owner_lock.is_locked()); ceph_assert(ictx->exclusive_lock == nullptr || - ictx->exclusive_lock->is_lock_owner()); + ictx->exclusive_lock->is_lock_owner()); C_SaferCond ctx; ictx->snap_lock.get_read(); diff --git a/src/librbd/journal/Replay.cc b/src/librbd/journal/Replay.cc index 82bae75e81e..739034439f1 100644 --- a/src/librbd/journal/Replay.cc +++ b/src/librbd/journal/Replay.cc @@ -307,9 +307,9 @@ void Replay::replay_op_ready(uint64_t op_tid, Context *on_resume) { OpEvent &op_event = op_it->second; ceph_assert(op_event.op_in_progress && - op_event.on_op_finish_event == nullptr && - op_event.on_finish_ready == nullptr && - op_event.on_finish_safe == nullptr); + op_event.on_op_finish_event == nullptr && + op_event.on_finish_ready == nullptr && + op_event.on_finish_safe == nullptr); // resume processing replay events Context *on_start_ready = nullptr; @@ -1034,13 +1034,13 @@ void Replay::handle_op_complete(uint64_t op_tid, int r) { if (op_event.on_start_ready != nullptr) { // blocking op event failed before it became ready ceph_assert(op_event.on_finish_ready == nullptr && - op_event.on_finish_safe == nullptr); + op_event.on_finish_safe == nullptr); op_event.on_start_ready->complete(0); } else { // event kicked off by OpFinishEvent ceph_assert((op_event.on_finish_ready != nullptr && - op_event.on_finish_safe != nullptr) || shutting_down); + op_event.on_finish_safe != nullptr) || shutting_down); } if (op_event.on_op_finish_event != nullptr) { diff --git a/src/librbd/operation/ObjectMapIterate.cc b/src/librbd/operation/ObjectMapIterate.cc index 2cd75a76bc8..5ab35e907ad 100644 --- a/src/librbd/operation/ObjectMapIterate.cc +++ b/src/librbd/operation/ObjectMapIterate.cc @@ -154,7 +154,7 @@ private: // should have been canceled prior to releasing lock ceph_assert(image_ctx.exclusive_lock == nullptr || - image_ctx.exclusive_lock->is_lock_owner()); + image_ctx.exclusive_lock->is_lock_owner()); RWLock::RLocker snap_locker(image_ctx.snap_lock); ceph_assert(image_ctx.object_map != nullptr); diff --git a/src/librbd/operation/RebuildObjectMapRequest.cc b/src/librbd/operation/RebuildObjectMapRequest.cc index b93258b9a42..f923f36c595 100644 --- a/src/librbd/operation/RebuildObjectMapRequest.cc +++ b/src/librbd/operation/RebuildObjectMapRequest.cc @@ -113,7 +113,7 @@ void RebuildObjectMapRequest::send_resize_object_map() { // should have been canceled prior to releasing lock ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); m_image_ctx.object_map->aio_resize(size, OBJECT_NONEXISTENT, this->create_callback_context()); @@ -128,7 +128,7 @@ void RebuildObjectMapRequest::send_trim_image() { // should have been canceled prior to releasing lock ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); ldout(cct, 5) << this << " send_trim_image" << dendl; m_state = STATE_TRIM_IMAGE; @@ -197,7 +197,7 @@ void RebuildObjectMapRequest::send_save_object_map() { // should have been canceled prior to releasing lock ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); RWLock::RLocker snap_locker(m_image_ctx.snap_lock); ceph_assert(m_image_ctx.object_map != nullptr); @@ -210,7 +210,7 @@ void RebuildObjectMapRequest::send_update_header() { // should have been canceled prior to releasing lock ceph_assert(m_image_ctx.exclusive_lock == nullptr || - m_image_ctx.exclusive_lock->is_lock_owner()); + m_image_ctx.exclusive_lock->is_lock_owner()); ldout(m_image_ctx.cct, 5) << this << " send_update_header" << dendl; m_state = STATE_UPDATE_HEADER; diff --git a/src/librbd/operation/ResizeRequest.cc b/src/librbd/operation/ResizeRequest.cc index 17bc7ff17c6..69e50e5d7c7 100644 --- a/src/librbd/operation/ResizeRequest.cc +++ b/src/librbd/operation/ResizeRequest.cc @@ -279,7 +279,7 @@ Context *ResizeRequest::send_grow_object_map() { // should have been canceled prior to releasing lock ceph_assert(image_ctx.exclusive_lock == nullptr || - image_ctx.exclusive_lock->is_lock_owner()); + image_ctx.exclusive_lock->is_lock_owner()); image_ctx.object_map->aio_resize( m_new_size, OBJECT_NONEXISTENT, create_context_callback< @@ -321,7 +321,7 @@ Context *ResizeRequest::send_shrink_object_map() { // should have been canceled prior to releasing lock ceph_assert(image_ctx.exclusive_lock == nullptr || - image_ctx.exclusive_lock->is_lock_owner()); + image_ctx.exclusive_lock->is_lock_owner()); image_ctx.object_map->aio_resize( m_new_size, OBJECT_NONEXISTENT, create_context_callback< @@ -381,7 +381,7 @@ void ResizeRequest::send_update_header() { // should have been canceled prior to releasing lock RWLock::RLocker owner_locker(image_ctx.owner_lock); ceph_assert(image_ctx.exclusive_lock == nullptr || - image_ctx.exclusive_lock->is_lock_owner()); + image_ctx.exclusive_lock->is_lock_owner()); librados::ObjectWriteOperation op; if (image_ctx.old_format) { diff --git a/src/librbd/operation/SnapshotCreateRequest.cc b/src/librbd/operation/SnapshotCreateRequest.cc index 2b693e032dc..e4cbd4000bc 100644 --- a/src/librbd/operation/SnapshotCreateRequest.cc +++ b/src/librbd/operation/SnapshotCreateRequest.cc @@ -164,7 +164,7 @@ void SnapshotCreateRequest::send_create_snap() { // should have been canceled prior to releasing lock ceph_assert(image_ctx.exclusive_lock == nullptr || - image_ctx.exclusive_lock->is_lock_owner()); + image_ctx.exclusive_lock->is_lock_owner()); // save current size / parent info for creating snapshot record in ImageCtx m_size = image_ctx.size; @@ -291,7 +291,7 @@ void SnapshotCreateRequest::update_snap_context() { // should have been canceled prior to releasing lock ceph_assert(image_ctx.exclusive_lock == nullptr || - image_ctx.exclusive_lock->is_lock_owner()); + image_ctx.exclusive_lock->is_lock_owner()); // immediately add a reference to the new snapshot utime_t snap_time = ceph_clock_now(); diff --git a/src/librbd/operation/TrimRequest.cc b/src/librbd/operation/TrimRequest.cc index 8bc183e1c77..9ba563589dc 100644 --- a/src/librbd/operation/TrimRequest.cc +++ b/src/librbd/operation/TrimRequest.cc @@ -41,7 +41,7 @@ public: I &image_ctx = this->m_image_ctx; ceph_assert(image_ctx.owner_lock.is_locked()); ceph_assert(image_ctx.exclusive_lock == nullptr || - image_ctx.exclusive_lock->is_lock_owner()); + image_ctx.exclusive_lock->is_lock_owner()); string oid = image_ctx.get_object_name(m_object_no); ldout(image_ctx.cct, 10) << "removing (with copyup) " << oid << dendl; @@ -71,7 +71,7 @@ public: I &image_ctx = this->m_image_ctx; ceph_assert(image_ctx.owner_lock.is_locked()); ceph_assert(image_ctx.exclusive_lock == nullptr || - image_ctx.exclusive_lock->is_lock_owner()); + image_ctx.exclusive_lock->is_lock_owner()); { RWLock::RLocker snap_locker(image_ctx.snap_lock); @@ -315,7 +315,7 @@ void TrimRequest::send_clean_boundary() { // should have been canceled prior to releasing lock ceph_assert(image_ctx.exclusive_lock == nullptr || - image_ctx.exclusive_lock->is_lock_owner()); + image_ctx.exclusive_lock->is_lock_owner()); uint64_t delete_len = m_delete_off - m_new_size; ldout(image_ctx.cct, 5) << this << " send_clean_boundary: " << " delete_off=" << m_delete_off -- 2.39.5