mirror of
https://github.com/ceph/ceph
synced 2025-02-19 08:57:27 +00:00
os/bluestore: implement collection_bits
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
17d3c9f43f
commit
27dc220abd
@ -2739,6 +2739,17 @@ bool BlueStore::collection_empty(coll_t cid)
|
||||
return empty;
|
||||
}
|
||||
|
||||
int BlueStore::collection_bits(coll_t cid)
|
||||
{
|
||||
dout(15) << __func__ << " " << cid << dendl;
|
||||
CollectionRef c = _get_collection(cid);
|
||||
if (!c)
|
||||
return -ENOENT;
|
||||
RWLock::RLocker l(c->lock);
|
||||
dout(10) << __func__ << " " << cid << " = " << c->cnode.bits << dendl;
|
||||
return c->cnode.bits;
|
||||
}
|
||||
|
||||
int BlueStore::collection_list(
|
||||
coll_t cid, ghobject_t start, ghobject_t end,
|
||||
bool sort_bitwise, int max,
|
||||
|
@ -642,6 +642,7 @@ public:
|
||||
int list_collections(vector<coll_t>& ls);
|
||||
bool collection_exists(coll_t c);
|
||||
bool collection_empty(coll_t c);
|
||||
int collection_bits(coll_t c);
|
||||
|
||||
int collection_list(coll_t cid, ghobject_t start, ghobject_t end,
|
||||
bool sort_bitwise, int max,
|
||||
|
Loading…
Reference in New Issue
Block a user