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>
If we get heartbeat messages from old epochs from peers that are not
current, drop them and mark the connection down. Even if they are peers
we _should_ have (because we haven't gotten a notify yet to learn about
a pg we should have but don't yet) we have a newer map epoch and will learn
about them shortly, reopening the connection.
Fixes: #1107
Signed-off-by: Sage Weil <sage@newdream.net>
- share the map with the cluster addr
- use the new {note,get}_peer_epoch helpers to do it sanely
- don't share if we're booting; see 818fa33a66
Signed-off-by: Sage Weil <sage@newdream.net>
This lets OSDMap::create_simple() see g_conf.osd_pool_default_size when
creating the initial data, metadata, and rbd pools.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>