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 <xie.xingguo@zte.com.cn>
This commit is contained in:
xie xingguo 2017-09-26 19:35:10 +08:00
parent 80e14271db
commit ef0c60fe08

View File

@ -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();
}