]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/FileStore: use bitwise sort when we don't care (e.g., split)
authorSage Weil <sage@redhat.com>
Mon, 13 Jul 2015 14:54:40 +0000 (10:54 -0400)
committerSage Weil <sage@redhat.com>
Fri, 7 Aug 2015 14:16:01 +0000 (10:16 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/FileStore.cc

index 9d83f15ff0ce263129845dec7356cabd61c2be0c..d225cf3f504803d3f6b35c97b6987c30791c21bc 100644 (file)
@@ -4484,7 +4484,8 @@ int FileStore::_collection_remove_recursive(const coll_t &cid,
   vector<ghobject_t> objects;
   ghobject_t max;
   while (!max.is_max()) {
-    r = collection_list(cid, max, ghobject_t::get_max(), 300, &objects, &max);
+    r = collection_list(cid, max, ghobject_t::get_max(), true,
+                       300, &objects, &max);
     if (r < 0)
       return r;
     for (vector<ghobject_t>::iterator i = objects.begin();
@@ -4631,7 +4632,8 @@ bool FileStore::collection_empty(coll_t c)
 
   vector<ghobject_t> ls;
   collection_list_handle_t handle;
-  r = index->collection_list_partial(ghobject_t(), ghobject_t::get_max(), 1, &ls, NULL);
+  r = index->collection_list_partial(ghobject_t(), ghobject_t::get_max(), true,
+                                    1, &ls, NULL);
   if (r < 0) {
     assert(!m_filestore_fail_eio || r != -EIO);
     return false;
@@ -5302,6 +5304,7 @@ int FileStore::_split_collection(coll_t cid,
       collection_list(
        cid,
        next, ghobject_t::get_max(),
+       true,
        get_ideal_list_max(),
        &objects,
        &next);
@@ -5321,6 +5324,7 @@ int FileStore::_split_collection(coll_t cid,
       collection_list(
        dest,
        next, ghobject_t::get_max(),
+       true,
        get_ideal_list_max(),
        &objects,
        &next);