os/bluestore: fix inappropriate ENOSPC from avl/hybrid allocator
Under high fragmentation circumstances (in best-fit mode) these allocators might fail to
return continuous(longer than a single alloc unit) extents. Occurs when
requested size is longer than the maximum available extents and these
extents are unaligned with alloc unit. The latter results in the actual lengths of these extens are shorter
than the requested length and they do not match to the lookup. Which
finally causes no allocation at all.
Fixes: https://tracker.ceph.com/issues/47883
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit
f927549d2d54e7464151d234377aa82bb753bca9)
Conflicts:
src/test/objectstore/Allocator_test.cc
Legacy gtest macros name