diff options
author | Sage Weil <sage@inktank.com> | 2013-09-16 22:48:56 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-09-17 06:27:34 -0700 |
commit | 805f95b3cff1c1cc97e214139f6738c70485944c (patch) | |
tree | 1668edcc10aca144a31c30f3363ce4d7b93d8268 | |
parent | 05d6160809d0f2ffc99c3e35e3f5b6c50b53d083 (diff) | |
download | ceph-805f95b3cff1c1cc97e214139f6738c70485944c.tar.gz |
osdc/Objecter: add no-truncate write() method
-rw-r--r-- | src/osdc/Objecter.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 9178630fd97..311f6c8fed5 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -280,8 +280,16 @@ struct ObjectOperation { out_handler[p] = h; out_rval[p] = prval; } - void write(uint64_t off, bufferlist& bl) { + void write(uint64_t off, bufferlist& bl, + uint64_t truncate_size, + uint32_t truncate_seq) { add_data(CEPH_OSD_OP_WRITE, off, bl.length(), bl); + OSDOp& o = *ops.rbegin(); + o.op.extent.truncate_size = truncate_size; + o.op.extent.truncate_seq = truncate_seq; + } + void write(uint64_t off, bufferlist& bl) { + write(off, bl, 0, 0); } void write_full(bufferlist& bl) { add_data(CEPH_OSD_OP_WRITEFULL, 0, bl.length(), bl); |