diff options
author | Yehuda Sadeh <yehuda@inktank.com> | 2013-03-14 10:28:54 -0700 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2013-04-15 14:23:12 -0700 |
commit | 281a3c8a2671528c4e18f735cf790761a51a2547 (patch) | |
tree | 2abd39dec899fe8b2cbdbbd62f417c1439b4624c | |
parent | 70aeb2c140e73d180ef5b2445bbbb4e15dc94c8e (diff) | |
download | ceph-281a3c8a2671528c4e18f735cf790761a51a2547.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 50a747e330c..99efa6d72f7 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1944,7 +1944,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 377ca8656a7..84a0dc7f201 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; |