Skip to content

Commit

Permalink
os/bluestore/BlueFS: If allocate failed, try releae unused extents.
Browse files Browse the repository at this point in the history
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
  • Loading branch information
majianpeng committed Sep 14, 2017
1 parent 05505c1 commit f17b944
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/os/bluestore/BlueFS.cc
Expand Up @@ -1816,6 +1816,10 @@ int BlueFS::_allocate(uint8_t id, uint64_t len,
int r = -ENOSPC;
if (alloc[id]) {
r = alloc[id]->reserve(left);
if (r < 0 && pending_release.size() > 0) {
_flush(log_writer, true);
r = alloc[id]->reserve(left);
}
}
if (r < 0) {
if (id != BDEV_SLOW) {
Expand Down

0 comments on commit f17b944

Please sign in to comment.