otherwise when using rbd cli to rollback image with object-map feature
enabled, the following error message will be printed out on the screen,
which is confusing to users:
librbd::object_map::LockRequest: failed to lock object map: (17) File exists
Fixes: http://tracker.ceph.com/issues/16179
Signed-off-by: runsisi <runsisi@zte.com.cn>
if (*ret_val == 0) {
return m_on_finish;
+ } else if (*ret_val == -EEXIST) {
+ // already locked by myself
+ *ret_val = 0;
+ return m_on_finish;
} else if (m_broke_lock || *ret_val != -EBUSY) {
lderr(cct) << "failed to lock object map: " << cpp_strerror(*ret_val)
<< dendl;