Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os/bluestore: fix leak of result-checking of _fsck_check_extents #11040

Merged
merged 4 commits into from Sep 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/os/bluestore/BlueStore.cc
Expand Up @@ -1702,6 +1702,8 @@ void BlueStore::ExtentMap::decode_some(bufferlist& bl)
++n;
extent_map.insert(*le);
}

assert(n == num);
}

void BlueStore::ExtentMap::encode_spanning_blobs(bufferlist& bl)
Expand Down Expand Up @@ -4145,7 +4147,7 @@ int BlueStore::fsck()
for (auto &r : shared_blob.ref_map.ref_map) {
extents.emplace_back(bluestore_pextent_t(r.first, r.second.length));
}
_fsck_check_extents(p->second.oids.front(),
errors += _fsck_check_extents(p->second.oids.front(),
extents,
p->second.compressed,
used_blocks, expected_statfs);
Expand Down
15 changes: 0 additions & 15 deletions src/os/bluestore/bluestore_types.h
Expand Up @@ -175,15 +175,6 @@ struct bluestore_extent_ref_map_t {
return ref_map.empty();
}

// raw reference insertion that assumes no conflicts/interference
// with the existing references
void fill(uint32_t offset, uint32_t len, int refs = 1) {
auto p = ref_map.insert(
map<uint32_t,record_t>::value_type(offset,
record_t(len, refs))).first;
_maybe_merge_left(p);
}

void get(uint32_t offset, uint32_t len);
void put(uint32_t offset, uint32_t len, vector<bluestore_pextent_t> *release);

Expand Down Expand Up @@ -599,12 +590,6 @@ WRITE_CLASS_ENCODER(bluestore_shared_blob_t)

ostream& operator<<(ostream& out, const bluestore_shared_blob_t& o);



/// blob id: positive = local, negative = shared bnode
typedef int64_t bluestore_blob_id_t;


/// onode: per-object metadata
struct bluestore_onode_t {
uint64_t nid = 0; ///< numeric id (locally unique)
Expand Down