Skip to content

Commit

Permalink
os/bluestore/BlueFS: check device id before using hint
Browse files Browse the repository at this point in the history
As we might be allocating space from different devices (though
the chance is rare).

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
  • Loading branch information
xiexingguo committed Sep 26, 2017
1 parent 25553e5 commit 9e5b05b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/os/bluestore/BlueFS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 9e5b05b

Please sign in to comment.