NewDreamNetwork/ceph — comment on commit d68f0de3ea848efb5ebc47ae50721c604d14c0a1
File: src/rgw/rgw_rados.cc line 1010
By yehudasa:

Your example really depends on the order of things, and one cannot expect either the file to exist or not if things were happening in parallel without any synchronization.

The prepare_atomic_for_write will return ECANCELED in case it was trying to clone the old object to the shadow object, but found out that the old object is different. In this case we behave as if we removed the old object but there was some other modification that followed.