*/
virtual int list_collections(vector<coll_t>& ls) = 0;
- virtual int collection_version_current(const coll_t& c, uint32_t *version) {
- *version = 0;
- return 1;
- }
/**
* does a collection exist?
*
dout(15) << "rmattr " << cid << "/" << oid << " '" << name << "'" << dendl;
FDRef fd;
bool spill_out = true;
- bufferptr bp;
int r = lfn_open(cid, oid, false, &fd);
if (r < 0) {
// --------------------------
// collections
-int FileStore::collection_version_current(const coll_t& c, uint32_t *version)
-{
- Index index;
- int r = get_index(c, &index);
- if (r < 0)
- return r;
-
- assert(NULL != index.index);
- RWLock::RLocker l((index.index)->access_lock);
-
- *version = index->collection_version();
- if (*version == target_version)
- return 1;
- else
- return 0;
-}
-
int FileStore::list_collections(vector<coll_t>& ls)
{
return list_collections(ls, false);
vector<ghobject_t> *ls, ghobject_t *next);
int list_collections(vector<coll_t>& ls);
int list_collections(vector<coll_t>& ls, bool include_temp);
- int collection_version_current(const coll_t& c, uint32_t *version);
int collection_stat(const coll_t& c, struct stat *st);
bool collection_exists(const coll_t& c);
bool collection_empty(const coll_t& c);