mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +00:00
librbd: simplify diff_iterate calls to list_snaps
We don't need the size. Use the simpler API call. Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
8ebf26ae18
commit
4e847e8b2c
@ -2369,12 +2369,7 @@ reprotect_and_return_err:
|
||||
ldout(ictx->cct, 20) << "diff_iterate object " << p->first << dendl;
|
||||
|
||||
librados::snap_set_t snap_set;
|
||||
uint64_t size;
|
||||
|
||||
librados::ObjectReadOperation op;
|
||||
op.stat(&size, NULL, NULL);
|
||||
op.list_snaps(&snap_set, NULL);
|
||||
int r = head_ctx.operate(p->first.name, &op, NULL);
|
||||
int r = head_ctx.list_snaps(p->first.name, &snap_set);
|
||||
if (r == -ENOENT) {
|
||||
if (from_snap_id == 0 && !parent_diff.empty()) {
|
||||
// report parent diff instead
|
||||
|
Loading…
Reference in New Issue
Block a user