]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: refuse to write a new erasure coded object with an offset > 0 4560/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Fri, 6 Mar 2015 07:54:07 +0000 (15:54 +0800)
committerLoic Dachary <ldachary@redhat.com>
Wed, 6 May 2015 08:54:58 +0000 (10:54 +0200)
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 a4f1256c214ee0e7ebb91ac4ea8655f5d9642dc8)

src/osd/ReplicatedPG.cc

index 479664fef57704ed27d716d99da997200e94eb89..37b2f51ad82088068930b036ab68ccd97a5829f3 100644 (file)
@@ -4120,6 +4120,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);