Bug #61472 » keep-mirror-snaps.patch
src/cls/rbd/cls_rbd.cc | ||
---|---|---|
if (mirror_ns->mirror_peer_uuids.count(mirror_peer_uuid) == 0) {
|
||
return -ENOENT;
|
||
}
|
||
mirror_ns->mirror_peer_uuids.erase(mirror_peer_uuid);
|
||
|
||
//mirror_ns->mirror_peer_uuids.erase(mirror_peer_uuid);
|
||
|
||
r = image::snapshot::write(hctx, snap_key, std::move(snap));
|
||
if (r < 0) {
|
||
return r;
|
src/common/options/rbd.yaml.in | ||
---|---|---|
type: uint
|
||
level: advanced
|
||
desc: mirroring snapshots limit
|
||
default: 5
|
||
default: 50000
|
||
services:
|
||
- rbd
|
||
min: 3
|
src/librbd/mirror/snapshot/CreatePrimaryRequest.cc | ||
---|---|---|
uint64_t max_snapshots = m_image_ctx->config.template get_val<uint64_t>(
|
||
"rbd_mirroring_max_mirroring_snapshots");
|
||
ceph_assert(max_snapshots >= 3);
|
||
std::string peer_uuid;
|
||
uint64_t snap_id = CEPH_NOSNAP;
|
src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc | ||
---|---|---|
// remove candidate that is required for delta snapshot sync
|
||
prune_snap_ids.erase(m_local_snap_id_start);
|
||
}
|
||
if (!prune_snap_ids.empty()) {
|
||
if (2<1 && !prune_snap_ids.empty()) {
|
||
locker->unlock();
|
||
auto prune_snap_id = *prune_snap_ids.begin();
|
||
... | ... | |
if (m_remote_snap_id_end == CEPH_NOSNAP) {
|
||
// haven't found the end snap so treat this as a candidate for unlink
|
||
unlink_snap_ids.insert(remote_snap_id);
|
||
///unlink_snap_ids.insert(remote_snap_id);
|
||
}
|
||
if (m_local_mirror_snap_ns.complete &&
|
||
m_local_mirror_snap_ns.primary_snap_id >= remote_snap_id) {
|
||
... | ... | |
// need anymore
|
||
auto remote_snap_id = *unlink_snap_ids.begin();
|
||
dout(10) << "unlinking from remote snapshot " << remote_snap_id << dendl;
|
||
unlink_peer(remote_snap_id);
|
||
return;
|
||
//unlink_peer(remote_snap_id);
|
||
//return;
|
||
}
|
||
if (m_remote_snap_id_end != CEPH_NOSNAP) {
|
||
... | ... | |
derr << "failed to notify local image update: " << cpp_strerror(r) << dendl;
|
||
}
|
||
unlink_peer(m_remote_snap_id_start);
|
||
//unlink_peer(m_remote_snap_id_start);
|
||
finish_sync();
|
||
}
|
||
template <typename I>
|
- « Previous
- 1
- …
- 5
- 6
- 7
- Next »