From ef0c60fe083c290b947dd71c102d79fd276b74da Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Tue, 26 Sep 2017 19:35:10 +0800 Subject: [PATCH] os/bluestore/BlueFS: check device id before using hint As we might be allocating space from different devices (though the chance is rare). Signed-off-by: xie xingguo --- src/os/bluestore/BlueFS.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 0805f843ad3..9159e28812d 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -1828,7 +1828,7 @@ int BlueFS::_allocate(uint8_t id, uint64_t len, } uint64_t hint = 0; - if (!ev->empty()) { + if (!ev->empty() && ev->back().bdev == id) { hint = ev->back().end(); }