Skip to content

Commit

Permalink
osd: refuse to write a new erasure coded object with an offset > 0
Browse files Browse the repository at this point in the history
Even if the offset is properly aligned.

http://tracker.ceph.com/issues/11507 Fixes: #11507

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Signed-off-by: Loic Dachary <ldachary@redhat.com>
(cherry picked from commit a4f1256)
  • Loading branch information
majianpeng authored and smithfarm committed May 9, 2015
1 parent fcd0ea3 commit 8372f1d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/osd/ReplicatedPG.cc
Expand Up @@ -3701,6 +3701,10 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
}

if (!obs.exists) {
if (pool.info.require_rollback() && op.extent.offset) {
result = -EOPNOTSUPP;
break;
}
ctx->mod_desc.create();
} else if (op.extent.offset == oi.size) {
ctx->mod_desc.append(oi.size);
Expand Down

0 comments on commit 8372f1d

Please sign in to comment.