]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: fix unexpected ENOSPC in Avl/Hybrid allocators. 41369/head
authorIgor Fedotov <ifed@suse.com>
Mon, 17 May 2021 19:23:26 +0000 (22:23 +0300)
committerIgor Fedotov <ifed@suse.com>
Tue, 1 Jun 2021 13:44:21 +0000 (16:44 +0300)
commit0eed13a4969d02eeb23681519f2a23130e51ac59
tree4575b685d0aafdd4be6f7cebd42200ebd633a4e1
parentf4d1ef9a95e31cb67499ddb265548eda73ab4289
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>
src/os/bluestore/AvlAllocator.cc
src/test/objectstore/Allocator_test.cc