]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
debugging output
authorGreg Farnum <gregf@hq.newdream.net>
Fri, 4 Jun 2010 01:22:24 +0000 (18:22 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Fri, 4 Jun 2010 01:22:24 +0000 (18:22 -0700)
src/osd/ReplicatedPG.cc

index abbcf8719486962ab033ccdd4d1fce2eb3d0b263..edb9715711cf8d52c8b3581882039c037377edb8 100644 (file)
@@ -1708,6 +1708,7 @@ inline void ReplicatedPG::_delete_head(OpContext *ctx)
 
 void ReplicatedPG::_rollback_to(OpContext *ctx, ceph_osd_op& op)
 {
+  dout(0) << "entering _rollback_to" << dendl;
   SnapSetContext *ssc = ctx->obs->ssc;
   const sobject_t& soid = ctx->obs->oi.soid;
   ObjectStore::Transaction& t = ctx->op_t;
@@ -1719,6 +1720,8 @@ void ReplicatedPG::_rollback_to(OpContext *ctx, ceph_osd_op& op)
     if (-ENOENT == ret) {
       // there's no snapshot here, or there's no object.
       // if there's no snapshot, we delete the object; otherwise, do nothing.
+      dout(0) << "_rollback_to deleting head on " << soid.oid
+              << " because got ENOENT on find_object_context" << dendl;
       _delete_head(ctx);
     } else if (-EAGAIN == ret) {
       /* a different problem, like degraded pool
@@ -1731,14 +1734,23 @@ void ReplicatedPG::_rollback_to(OpContext *ctx, ceph_osd_op& op)
     }
   } else { //we got our context, let's use it to do the rollback!
     if (ctx->clone_obc &&
-       (ctx->clone_obc->obs.oi.prior_version == ctx->obs->oi.prior_version))
+       (ctx->clone_obc->obs.oi.prior_version == ctx->obs->oi.prior_version)) {
       ; //just cloned the rollback target, we don't need to do anything!
-    
+      dout(0) << "_rollback_to has no work thanks to make_writeable" << dendl;
+    }
     else {
       /* 1) Delete current head
        * 2) Clone correct snapshot into head
        * 3) Calculate clone_overlaps by following overlaps
        *    forward from rollback snapshot */
+      dout(0) << "_rollback_to deleting " << soid.oid
+             << " and rolling back to old snap"
+             << " because we don't have a fresh clone (known by: clone_obj="
+             << ctx->clone_obc << " and clone_obc.obs.oi.prior_version="
+             << ctx->clone_obc->obs.oi.prior_version
+             << " and ctx->obs.oi.prior_version="
+             << ctx->obs->oi.prior_version
+             << dendl;
       sobject_t new_head = get_object_context(ctx->obs->oi.soid)
        ->obs.oi.soid;