Skip to content

Commit

Permalink
librbd: clean up log message for copy-on-read
Browse files Browse the repository at this point in the history
Signed-off-by: Cheng Cheng <[email protected]>
  • Loading branch information
cchengleo committed Jan 23, 2015
1 parent bda293a commit b304af3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
12 changes: 3 additions & 9 deletions src/librbd/AioRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ namespace librbd {
m_state = LIBRBD_AIO_WRITE_COPYUP;

if (is_copy_on_read(m_ictx, m_snap_id)) {
m_ictx->copyup_list_lock.Lock();
m_ictx->copyup_list_lock.Lock();
it = m_ictx->copyup_list.find(m_object_no);
if (it == m_ictx->copyup_list.end()) {
// If it is not in the list, create a CopyupRequest and wait for it.
Expand All @@ -302,16 +302,12 @@ namespace librbd {
m_ictx->copyup_list[m_object_no] = new_req;

m_entire_object = &(new_req->get_copyup_data());
ldout(m_ictx->cct, 20) << __func__ << " creating new Copyup for AioWrite, obj-"
<< m_object_no << dendl;
m_ictx->copyup_list_lock.Unlock();
m_ictx->copyup_list_lock.Unlock();
new_req->read_from_parent();
ldout(m_ictx->cct, 20) << __func__ << " issuing read_from_parent" << dendl;
} else {
ldout(m_ictx->cct, 20) << __func__ << " someone is reading back from parent" << dendl;
it->second->append_request(this);
m_entire_object = &it->second->get_copyup_data();
m_ictx->copyup_list_lock.Unlock();
m_ictx->copyup_list_lock.Unlock();
}
} else {
read_from_parent(m_object_image_extents);
Expand Down Expand Up @@ -342,8 +338,6 @@ namespace librbd {
// CopyupRequest, m_read_data should be empty.
if (m_entire_object != NULL) {
assert(m_ictx->copyup_list_lock.is_locked());
ldout(m_ictx->cct, 20) << __func__ << " releasing self pending, obj-"
<< m_object_no << dendl;
assert(m_ictx->copyup_list.find(m_object_no) !=
m_ictx->copyup_list.end());
assert(m_read_data.length() == 0);
Expand Down
5 changes: 0 additions & 5 deletions src/librbd/CopyupRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ namespace librbd {
assert(m_ictx->copyup_list_lock.is_locked());
assert(m_pending_requests.empty());

ldout(m_ictx->cct, 20) << __func__ << " removing the slot " << dendl;
map<uint64_t, CopyupRequest*>::iterator it =
m_ictx->copyup_list.find(m_object_no);
assert(it != m_ictx->copyup_list.end());
Expand All @@ -38,10 +37,6 @@ namespace librbd {
if (m_ictx->copyup_list.empty()) {
m_ictx->copyup_list_cond.Signal();
}

ldout(m_ictx->cct, 20) << __func__ << " remove the slot " << m_object_no
<< " in copyup_list, size = " << m_ictx->copyup_list.size()
<< dendl;
}

ceph::bufferlist& CopyupRequest::get_copyup_data() {
Expand Down

0 comments on commit b304af3

Please sign in to comment.