_rollback_to in the case that head was just cloned and that clone
includes snapid does not need to do anything. Previously, snapid would
have to match the snap on the clone, but the condition should be that
snapid is contained within the clone's snaps set.
This bug was introduced in
e189222f06ee287eeb6fd7f46cff7a6727806dea
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
}
} else { //we got our context, let's use it to do the rollback!
sobject_t& rollback_to_sobject = rollback_to->obs.oi.soid;
- if (ctx->clone_obc &&
- (ctx->clone_obc->obs.oi.soid.snap == snapid)) {
+ if (ctx->clone_obc && *ctx->clone_obc->obs.oi.snaps.rbegin() <= snapid) {
//just cloned the rollback target, we don't need to do anything!
-
} else {
/* 1) Delete current head
* 2) Clone correct snapshot into head