]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: simplify diff_iterate calls to list_snaps 194/head
authorSage Weil <sage@inktank.com>
Wed, 3 Apr 2013 01:13:01 +0000 (18:13 -0700)
committerSage Weil <sage@inktank.com>
Wed, 3 Apr 2013 01:13:01 +0000 (18:13 -0700)
We don't need the size.  Use the simpler API call.

Signed-off-by: Sage Weil <sage@inktank.com>
src/librbd/internal.cc

index 939a485587bb1a5274f65ddcb6146224de25b3ed..55461aa3a700e1d2ee5705ae71c4d3651f524375 100644 (file)
@@ -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