#include "librbd/operation/SnapshotRenameRequest.h"
#include "common/dout.h"
#include "common/errno.h"
-#include "librbd/ExclusiveLock.h"
#include "librbd/ImageCtx.h"
#define dout_subsys ceph_subsys_rbd
template <typename I>
journal::Event SnapshotRenameRequest<I>::create_event(uint64_t op_tid) const {
I &image_ctx = this->m_image_ctx;
- ceph_assert(image_ctx.snap_lock.is_locked());
+ ceph_assert(ceph_mutex_is_locked(image_ctx.image_lock));
std::string src_snap_name;
auto snap_info_it = image_ctx.snap_info.find(m_snap_id);
template <typename I>
void SnapshotRenameRequest<I>::send_rename_snap() {
I &image_ctx = this->m_image_ctx;
- ceph_assert(image_ctx.owner_lock.is_locked());
- RWLock::RLocker md_locker(image_ctx.md_lock);
- RWLock::RLocker snap_locker(image_ctx.snap_lock);
+ ceph_assert(ceph_mutex_is_locked(image_ctx.owner_lock));
+ std::shared_lock image_locker{image_ctx.image_lock};
CephContext *cct = image_ctx.cct;
ldout(cct, 5) << this << " " << __func__ << dendl;