Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crimson/os/seastore: open_collection() returns nullptr if DNE
we check for the existence of meta collection by trying to open it, if it exists, we continue check for the superblock stored in it, if the superblock does not exist or corrupted, we consider it as a failure. before this change, open_collection() always return a valud Collection even if the store does not have the collection with specified cid. this behavior could be misleading in the use case above. after this change, open_collection() looks up the collections stored in root collection node for the specfied cid, and return nullptr if it does not exist. Signed-off-by: Kefu Chai <kchai@redhat.com>
- Loading branch information