diff options
Diffstat (limited to 'src/osdc')
-rw-r--r-- | src/osdc/Objecter.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 19efc500685..3ce5e256c24 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -367,6 +367,22 @@ struct ObjectOperation { add_data(CEPH_OSD_OP_SPARSE_READ, off, len, bl); } + void checksum(uint8_t type, const bufferlist &init_value_bl, + uint64_t off, uint64_t len, size_t chunk_size, + bufferlist *pbl, int *prval, Context *ctx) { + OSDOp& osd_op = add_op(CEPH_OSD_OP_CHECKSUM); + osd_op.op.checksum.offset = off; + osd_op.op.checksum.length = len; + osd_op.op.checksum.type = type; + osd_op.op.checksum.chunk_size = chunk_size; + osd_op.indata.append(init_value_bl); + + unsigned p = ops.size() - 1; + out_bl[p] = pbl; + out_rval[p] = prval; + out_handler[p] = ctx; + } + // object attrs void getxattr(const char *name, bufferlist *pbl, int *prval) { bufferlist bl; |