diff options
author | Yehuda Sadeh <yehuda@inktank.com> | 2013-03-14 10:28:54 -0700 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2013-03-14 10:29:57 -0700 |
commit | a48ea42c750072e86e78de15a83fc2bac76c25f8 (patch) | |
tree | 8ad9a2dece93fd325faef21e646d7ca0d2fe2b29 | |
parent | abc497539436139b2f96ab5943ffd08085d118a1 (diff) | |
download | ceph-a48ea42c750072e86e78de15a83fc2bac76c25f8.tar.gz |
osd: keep track of current osd subop num
This can be used later to generate unique subop versions
in compound write operations.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r-- | src/osd/ReplicatedPG.cc | 2 | ||||
-rw-r--r-- | src/osd/ReplicatedPG.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index cfa6bbabe8a..31294e86e89 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1850,7 +1850,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops) dout(10) << "do_osd_op " << soid << " " << ops << dendl; - for (vector<OSDOp>::iterator p = ops.begin(); p != ops.end(); p++) { + for (vector<OSDOp>::iterator p = ops.begin(); p != ops.end(); p++, ctx->current_osd_subop_num++) { OSDOp& osd_op = *p; ceph_osd_op& op = osd_op.op; diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index 50af643163a..105015244ba 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -279,6 +279,8 @@ public: eversion_t at_version; // pg's current version pointer eversion_t reply_version; // the version that we report the client (depends on the op) + int current_osd_subop_num; + ObjectStore::Transaction op_t, local_t; vector<pg_log_entry_t> log; @@ -305,6 +307,7 @@ public: new_obs(_obs->oi, _obs->exists), modify(false), user_modify(false), bytes_written(0), bytes_read(0), + current_osd_subop_num(0), obc(0), clone_obc(0), snapset_obc(0), data_off(0), reply(NULL), pg(_pg) { if (_ssc) { new_snapset = _ssc->snapset; |