]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: use TMAP_RMSLOPPY op when removing dentries
authorSage Weil <sage@inktank.com>
Wed, 28 Nov 2012 04:43:38 +0000 (20:43 -0800)
committerSage Weil <sage@inktank.com>
Mon, 3 Dec 2012 11:42:17 +0000 (03:42 -0800)
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 <sage@inktank.com>
src/mds/CDir.cc

index c5220ed6c94804ee9e0971d294764f84c1ea4cd9..55b76d3a298a7558c48a8b4e5e17a66f1e026dd8 100644 (file)
@@ -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;