]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/BlueFS: check device id before using hint 17966/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 26 Sep 2017 11:35:10 +0000 (19:35 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 26 Sep 2017 13:45:54 +0000 (21:45 +0800)
As we might be allocating space from different devices (though
the chance is rare).

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

index 0805f843ad33a0ae9fa737711b8ddb2befe61a0e..9159e28812d8f114cf0e728035ed54624720d009 100644 (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();
   }