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);
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);
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);
}
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);
}
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);
}
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);
}
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);
}
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);
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);
}
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);
}
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);
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)) {
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;
{
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;
}
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) {
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;
ManagedLock<I>::~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
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);
}
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 ||
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;
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;
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,
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;
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;
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;
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);
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) {
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();
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
{
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());
}
}
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) {
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) {
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) {
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
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;
template <typename I>
int Operations<I>::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;
}
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;
}
{
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();
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;
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) {
// 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);
// 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());
// 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;
// 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);
// 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;
// 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<
// 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<
// 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) {
// 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;
// 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();
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;
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);
// 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