From: Sage Weil Date: Wed, 28 Nov 2012 04:43:38 +0000 (-0800) Subject: mds: use TMAP_RMSLOPPY op when removing dentries X-Git-Tag: v0.55~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4870b43cab9c4cf67a0cde0ebee2aa2ce6cef56d;p=ceph.git mds: use TMAP_RMSLOPPY op when removing dentries After replay, we don't know if the dentry removal has already been committed. Use a sloppy removal so that we succeed even if we are repeating the operation. Conveniently, the previous implementation (pre v0.55) silently ignored tmap op codes it did not understand, which means this new RMSLOPPY will be interpreted the same as an actual RMSLOPPY. That means an v0.55 mds can run against an older osd (say, argonaut) without problems. Signed-off-by: Sage Weil --- diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc index c5220ed6c948..55b76d3a298a 100644 --- a/src/mds/CDir.cc +++ b/src/mds/CDir.cc @@ -1803,7 +1803,7 @@ CDir::map_t::iterator CDir::_commit_partial(ObjectOperation& m, if (dn->get_linkage()->is_null()) { dout(10) << " rm " << dn->name << " " << *dn << dendl; - finalbl.append(CEPH_OSD_TMAP_RM); + finalbl.append(CEPH_OSD_TMAP_RMSLOPPY); dn->key().encode(finalbl); } else { dout(10) << " set " << dn->name << " " << *dn << dendl;