]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os: make implementation flush before collection_{list,empty}
authorSage Weil <sage@redhat.com>
Sat, 27 Jan 2018 16:59:01 +0000 (10:59 -0600)
committerSage Weil <sage@redhat.com>
Tue, 6 Feb 2018 20:09:30 +0000 (14:09 -0600)
This takes the (awkward) burden off the caller.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc
src/os/filestore/FileStore.h
src/os/kstore/KStore.cc

index 6c9815ae0912e5e2427ef195b0a7f731a19f2b1a..9b50d6200d007c6ae3e0afea633aefd7fa86982f 100644 (file)
@@ -7234,6 +7234,7 @@ int BlueStore::collection_list(
   vector<ghobject_t> *ls, ghobject_t *pnext)
 {
   Collection *c = static_cast<Collection *>(c_.get());
+  c->flush();
   dout(15) << __func__ << " " << c->cid
            << " start " << start << " end " << end << " max " << max << dendl;
   int r;
index af479e70753a2c57e173fa75cc2d42e540ec805d..d401909b62847fb287b04a8d493d412d883f7416 100644 (file)
@@ -686,6 +686,7 @@ public:
   int collection_list(CollectionHandle& c,
                      const ghobject_t& start, const ghobject_t& end, int max,
                      vector<ghobject_t> *ls, ghobject_t *next) override {
+    c->flush();
     return collection_list(c->cid, start, end, max, ls, next);
   }
   int collection_list(const coll_t& cid,
@@ -696,6 +697,7 @@ public:
   int collection_stat(const coll_t& c, struct stat *st);
   bool collection_exists(const coll_t& c) override;
   int collection_empty(CollectionHandle& c, bool *empty) override {
+    c->flush();
     return collection_empty(c->cid, empty);
   }
   int collection_empty(const coll_t& cid, bool *empty);
index dce11a5f0e45a8c7daa1201577ca65017146da7a..a0a79274eb88c953d6cbab2e2beb4b2d9e33cf4e 100644 (file)
@@ -1443,6 +1443,7 @@ int KStore::collection_list(
 
 {
   Collection *c = static_cast<Collection*>(c_.get());
+  c->flush();
   dout(15) << __func__ << " " << c->cid
            << " start " << start << " end " << end << " max " << max << dendl;
   int r;