]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore/BlueFS: sanity check that alloc->allocate() won't return 0 18259/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 12 Oct 2017 02:34:27 +0000 (10:34 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 12 Oct 2017 02:34:27 +0000 (10:34 +0800)
commit4be8a9d552b5a2903d6fad000a8f7c95feac64ad
treeae0b2662f2e0a1a16cb64fb4462b73349c8a969c
parent9494a69fd903bc0da188b671edfd21e96358a3ef
os/bluestore/BlueFS: sanity check that alloc->allocate() won't return 0

If alloc[id]->allocate() returns 0, no space is actually reclaimed.
But BlueStore treats returning 0 as success and will keep reclaiming
space from BlueFS until hit the given threshold, which turns out to
be deadloop-prone.

For now, Bitmap and Stupid never return 0-length allocated space
(which is instead converted to -ENOSPC to suggest an error to caller),
so sanity checking against result code 0 will suffice.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueFS.cc