Skip to content

Commit

Permalink
osd: consolidate encoding snaps into pg log code in finish_ctx
Browse files Browse the repository at this point in the history
'MODIFY', 'PROMOTE' and 'CLEAN' are sharing the same encoding snaps
code.

Signed-off-by: Zhiqiang Wang <[email protected]>
  • Loading branch information
wonzhq committed Aug 21, 2015
1 parent b33209b commit 5fedc84
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/osd/ReplicatedPG.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6132,15 +6132,9 @@ void ReplicatedPG::finish_ctx(OpContext *ctx, int log_op_type, bool maintain_ssc
ctx->user_at_version, ctx->reqid,
ctx->mtime));
if (soid.snap < CEPH_NOSNAP) {
set<snapid_t> _snaps(ctx->new_obs.oi.snaps.begin(),
ctx->new_obs.oi.snaps.end());
switch (log_op_type) {
case pg_log_entry_t::MODIFY:
case pg_log_entry_t::PROMOTE:
dout(20) << __func__ << " encoding snaps " << ctx->new_obs.oi.snaps
<< dendl;
::encode(ctx->new_obs.oi.snaps, ctx->log.back().snaps);
break;
case pg_log_entry_t::CLEAN:
dout(20) << __func__ << " encoding snaps " << ctx->new_obs.oi.snaps
<< dendl;
Expand Down

0 comments on commit 5fedc84

Please sign in to comment.