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: ceph#11507

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Signed-off-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
majianpeng authored and ldachary committed May 5, 2015
1 parent 4f45409 commit a4f1256
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/osd/ReplicatedPG.cc
Expand Up @@ -4154,6 +4154,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 a4f1256

Please sign in to comment.