]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: fix unexpected ENOSPC in Avl/Hybrid allocators. 41658/head
authorIgor Fedotov <ifed@suse.com>
Mon, 17 May 2021 19:23:26 +0000 (22:23 +0300)
committerNeha Ojha <nojha@redhat.com>
Wed, 2 Jun 2021 16:24:41 +0000 (16:24 +0000)
commita9e1a3e6fdf4754a93a544dc8cb15004285dc984
treea8588f3e2eadbae222b1aeca1e18349ea2f9f0e2
parent24a876756360e808e9ee6111cb9f9383ed221186
os/bluestore: fix unexpected ENOSPC in Avl/Hybrid allocators.

Avl allocator mode was returning unexpected ENOSPC in first-fit mode if all size-
matching available extents were unaligned but applying the alignment made all of
them shorter than required. Since no lookup retry with smaller size -
ENOSPC is returned.
Additionally we should proceed with a lookup in best-fit mode even when
original size has been truncated to match the avail size.
(force_range_size_alloc==true)

Fixes: https://tracker.ceph.com/issues/50656
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 0eed13a4969d02eeb23681519f2a23130e51ac59)
src/os/bluestore/AvlAllocator.cc
src/test/objectstore/Allocator_test.cc