]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix make_writeable
authorSage Weil <sage@newdream.net>
Mon, 13 Jun 2011 19:04:55 +0000 (12:04 -0700)
committerSage Weil <sage@newdream.net>
Mon, 13 Jun 2011 19:04:55 +0000 (12:04 -0700)
Look at the ObjectState to determine if the head exists, not the snapset
(which doesn't reflect the prior object state).

Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/ReplicatedPG.cc

index a6f9a23b56c55d7421170baa74843e9960fc7f61..aa35124ea4f4ff0e227edf7fa6430a7dd4f18699 100644 (file)
@@ -2062,7 +2062,7 @@ void ReplicatedPG::make_writeable(OpContext *ctx)
     dout(10) << " using newer snapc " << snapc << dendl;
   }
   
-  if (ssc->snapset.head_exists &&           // head exists
+  if (ctx->obc->obs.exists &&               // head exist(ed)
       snapc.snaps.size() &&                 // there are snaps
       snapc.snaps[0] > ssc->snapset.seq) {  // existing object is old
     // clone