Merge pull request #15595 from ztczll/zl

os/bluestore/BlueFS: .slow should be compared with dirname

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-06-13 10:26:34 -05:00 committed by GitHub
commit b431d3d7f0
3 changed files with 3 additions and 2 deletions

View File

@ -1970,7 +1970,7 @@ int BlueFS::open_for_write(
// match up with bluestore. the slow device is always the second
// one (when a dedicated block.db device is present and used at
// bdev 0). the wal device is always last.
if (boost::algorithm::ends_with(filename, ".slow")) {
if (boost::algorithm::ends_with(dirname, ".slow")) {
file->fnode.prefer_bdev = BlueFS::BDEV_SLOW;
} else if (boost::algorithm::ends_with(dirname, ".wal")) {
file->fnode.prefer_bdev = BlueFS::BDEV_WAL;

View File

@ -680,7 +680,7 @@ TEST_F(ObjectMapTest, CreateOneObject) {
bufferlist bl;
bl.append(bp);
to_set.insert(make_pair(key, bl));
ASSERT_FALSE(db->set_keys(hoid, to_set));
ASSERT_EQ(db->set_keys(hoid, to_set), 0);
map<string, bufferlist> got;
set<string> to_get;

View File

@ -224,6 +224,7 @@ protected:
Cond cond;
MonMsgTest() :
reply_msg(NULL),
MonClientHelper(g_ceph_context),
lock("lock") { }