mirror of
https://github.com/ceph/ceph
synced 2025-02-18 16:37:41 +00:00
librbd: diff_iterate fromsnapname after the end snap is also invalid
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
a69532e864
commit
f0c9a200ec
@ -22,6 +22,9 @@ rbd bench-write foo --io-size 4096 --io-threads 5 --io-total 4096000 --io-patter
|
||||
rbd snap create foo --snap=three
|
||||
rbd snap create foo.copy --snap=two
|
||||
|
||||
rbd export-diff foo@two --from-snap three foo.diff && exit 1 || true # wrong snap order
|
||||
rm foo.diff
|
||||
|
||||
rbd export-diff foo@three --from-snap two foo.diff
|
||||
rbd import-diff foo.diff foo.copy
|
||||
rbd snap ls foo.copy | grep three
|
||||
|
@ -2305,6 +2305,9 @@ reprotect_and_return_err:
|
||||
// no diff.
|
||||
return 0;
|
||||
}
|
||||
if (from_snap_id >= end_snap_id) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
// we must list snaps via the head, not end snap
|
||||
head_ctx.snap_set_read(CEPH_SNAPDIR);
|
||||
|
Loading…
Reference in New Issue
Block a user