From: Sage Weil Date: Wed, 23 Dec 2015 15:19:17 +0000 (-0500) Subject: os/bluestore/StupidAllocator: fix reservation release on allocate X-Git-Tag: v10.0.3~154^2~46 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2b2cc88d334afb27cbc6a946d92fa6f2601dcfe8;p=ceph.git os/bluestore/StupidAllocator: fix reservation release on allocate Use up the amount we allocated, not the amount we asked for. Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/StupidAllocator.cc b/src/os/bluestore/StupidAllocator.cc index 307c21158395..be4d5633e454 100644 --- a/src/os/bluestore/StupidAllocator.cc +++ b/src/os/bluestore/StupidAllocator.cc @@ -158,7 +158,7 @@ int StupidAllocator::allocate( } num_free -= *length; - num_reserved -= need_size; + num_reserved -= *length; assert(num_free >= 0); assert(num_reserved >= 0); last_alloc = *offset + *length;