Encode the src_oid in the OSDOp data space, but put it in a separate easy
to access member. This avoids changing the overall MOSDOp encoding, and
seems cleaner overall.
Signed-off-by: Sage Weil <sage@newdream.net>
We need to ensure that the src and dst objects are always in the same pg.
That is true if
- both oloc.keys match, or
- the (src,dst) oloc.key matches the (dst,src) object name
Signed-off-by: Sage Weil <sage@newdream.net>
Clone ranges of bytes between objects, provided
- src object locators match dest object
- src objects are not missing
- src objects are all head (CEPH_NOSNAP)
-
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
The old OP_CLONERANGE would only clone a range of bytes at the same offset
in both objects. Add an OP_CLONERANGE2 op code that adds a dst offset.
Continue to support the old op code so that we can decode old transactions.
Signed-off-by: Sage Weil <sage@newdream.net>
We need to seek to the appropriate offsets on the src and destination
fd's for this to do the right thing.
Signed-off-by: Sage Weil <sage@newdream.net>
Add a src_oids field to MOSDOp, referenced by a new CLONERANGE osd op type
that will clone data from one object to another.
- The src_oids will need to have the same locator as the destination object
type to ensure this operation can succeed.
- The OSD is going to have to do extra work to ensure the src object(s)
are readable, etc., at the time of the clone.
Signed-off-by: Sage Weil <sage@newdream.net>
Implement a per-ioctx flush that blocks until all previously submitted
aio operations on the ioctx are safe. Each aio gets a sequence number and
is put on a linked list attached to the ioctx. The flush operation waits
for it to drain to the watermark set when flush is first called.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>