If removed_snaps is non-empty, then snaps are managed by the
user: snap context is specified for all writes (e.g., MDS or
librados user using the snap context api).
We can enforce this by adding an (unused) snapid (1) to the
removed_snaps the first time a non-pool snap snapid is allocated.
__le64 snap_seq; /* seq for per-pool snapshot */
__le32 snap_epoch; /* epoch of last snap */
__le32 num_snaps;
- __le32 num_removed_snap_intervals;
+ __le32 num_removed_snap_intervals; /* if non-empty, NO per-pool snaps */
__le64 auid; /* who owns the pg */
} __attribute__ ((packed));
* explicit removed_snaps set.
*/
void build_removed_snaps(interval_set<snapid_t>& rs) const {
- if (snaps.size()) {
+ if (removed_snaps.empty()) {
for (snapid_t s = 1; s <= get_snap_seq(); s = s + 1)
if (snaps.count(s) == 0)
rs.insert(s);