summaryrefslogtreecommitdiffstats
path: root/src/os/bluestore/BlueFS.cc
diff options
context:
space:
mode:
authorIgor Fedotov <igor.fedotov@croit.io>2023-07-24 05:20:51 +0200
committerIgor Fedotov <igor.fedotov@croit.io>2024-07-11 13:49:00 +0200
commit54b6d2433894a4b59f5e31c01865a4c99669d207 (patch)
treedc9fddfa669626a7415e66e92aa9e0a0e8470133 /src/os/bluestore/BlueFS.cc
parentos/bluestore: introduce new allocator hybrid_btree2 (diff)
downloadceph-54b6d2433894a4b59f5e31c01865a4c99669d207.tar.xz
ceph-54b6d2433894a4b59f5e31c01865a4c99669d207.zip
os/bluestore: uniform allocator's error handling
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
Diffstat (limited to 'src/os/bluestore/BlueFS.cc')
-rw-r--r--src/os/bluestore/BlueFS.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc
index 32086a17aa6..db8a2b9ce84 100644
--- a/src/os/bluestore/BlueFS.cc
+++ b/src/os/bluestore/BlueFS.cc
@@ -3954,8 +3954,9 @@ int BlueFS::_allocate(uint8_t id, uint64_t len,
}
if (alloc_len < 0 || alloc_len < need) {
if (alloc[id]) {
- if (alloc_len > 0) {
+ if (extents.size()) {
alloc[id]->release(extents);
+ extents.clear();
}
if (!was_cooldown && shared) {
auto delay_s = cct->_conf->bluefs_failed_shared_alloc_cooldown;