]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: remove OpContext::reply_user_version
authorGreg Farnum <greg@inktank.com>
Wed, 21 Aug 2013 00:11:14 +0000 (17:11 -0700)
committerGreg Farnum <greg@inktank.com>
Wed, 28 Aug 2013 00:24:50 +0000 (17:24 -0700)
ctx->new_obs.oi.user_version is initialized to ctx->obs.oi.user_version,
and for read ops it won't be changed. That means
reply_user_version == ctx->new_obs.oi.user_version in all cases, which
means we don't want it.

Signed-off-by: Greg Farnum <greg@inktank.com>
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

index e42b532c50d8f18a5e18a294203c1a709a957537..70bfc893ce624af377df605ce94cdb562dada087 100644 (file)
@@ -1029,7 +1029,7 @@ void ReplicatedPG::do_op(OpRequestRef op)
 
   if (result >= 0) {
     ctx->reply->set_replay_version(ctx->at_version);
-    ctx->reply->set_user_version(ctx->reply_user_version);
+    ctx->reply->set_user_version(ctx->new_obs.oi.user_version);
   } else if (result == -ENOENT) {
     ctx->reply->set_replay_version(info.last_update);
     ctx->reply->set_user_version(info.last_update.version);
@@ -3792,7 +3792,6 @@ int ReplicatedPG::prepare_transaction(OpContext *ctx)
 
   // read-op?  done?
   if (ctx->op_t.empty() && !ctx->modify) {
-    ctx->reply_user_version = ctx->obs->oi.user_version;
     unstable_stats.add(ctx->delta_stats, ctx->obc->obs.oi.category);
     return result;
   }
@@ -3854,7 +3853,6 @@ int ReplicatedPG::prepare_transaction(OpContext *ctx)
     /* update the user_version for any modify ops, except for the watch op */
     ctx->new_obs.oi.user_version = ctx->at_version.version;
   }
-  ctx->reply_user_version = ctx->new_obs.oi.user_version;
   ctx->bytes_written = ctx->op_t.get_encoded_bytes();
  
   if (ctx->new_obs.exists) {
index 878816fd1fa4db65f1294840b4c6b7014cc691a3..dcc659e65a9ba1e5b4cf9d5946c72842668b33ec 100644 (file)
@@ -116,7 +116,6 @@ public:
     utime_t mtime;
     SnapContext snapc;           // writer snap context
     eversion_t at_version;       // pg's current version pointer
-    version_t reply_user_version;    // the version that we report the client (depends on the op)
 
     int current_osd_subop_num;