]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: fix unexpected ENOSPC in Avl/Hybrid allocators. 41673/head
authorIgor Fedotov <ifed@suse.com>
Mon, 17 May 2021 19:23:26 +0000 (22:23 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Thu, 3 Jun 2021 10:13:03 +0000 (13:13 +0300)
commitf2be18f1f80948d87ad142b80314de44a0fd39e9
tree6e7d6b5e8657c577e6881fc5668196e95a12b778
parent81140393b714711db2864c93a59317ca0d393805
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)

 Conflicts:
src/test/objectstore/Allocator_test.cc - legacy INSTANTIATE_TEST_CASE_P clause is still used in Nautilus
src/os/bluestore/AvlAllocator.cc
src/test/objectstore/Allocator_test.cc