]>
git.proxmox.com Git - ceph.git/blob - ceph/src/librbd/deep_copy/Utils.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
10 void compute_snap_map(librados::snap_t snap_id_start
,
11 librados::snap_t snap_id_end
,
12 const SnapSeqs
&snap_seqs
,
15 for (auto &it
: snap_seqs
) {
16 snap_ids
.insert(snap_ids
.begin(), it
.second
);
17 if (it
.first
< snap_id_start
) {
19 } else if (it
.first
> snap_id_end
) {
23 (*snap_map
)[it
.first
] = snap_ids
;
28 } // namespace deep_copy