]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
bluestore: correctly check all block devices to decide if journal is_rotational 20651/head
authorGreg Farnum <gfarnum@redhat.com>
Mon, 26 Feb 2018 21:33:45 +0000 (13:33 -0800)
committerGreg Farnum <gfarnum@redhat.com>
Wed, 28 Feb 2018 19:34:24 +0000 (11:34 -0800)
Fixes: http://tracker.ceph.com/issues/23141
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 2d3fb03e194c8ed99436239bab66d161b8316bca)

src/os/bluestore/BlueFS.cc

index 2cef37e23e99065ee6488d0347943396c13e45ee..f5c72ce314b4865bdae397d40cc4f77cdb50cfc0 100644 (file)
@@ -2322,7 +2322,10 @@ int BlueFS::unlink(const string& dirname, const string& filename)
 
 bool BlueFS::wal_is_rotational()
 {
-  if (!bdev[BDEV_WAL] || bdev[BDEV_WAL]->is_rotational())
-    return true;
-  return false;
+  if (bdev[BDEV_WAL]) {
+    return bdev[BDEV_WAL]->is_rotational();
+  } else if (bdev[BDEV_DB]) {
+    return bdev[BDEV_DB]->is_rotational();
+  }
+  return bdev[BDEV_SLOW]->is_rotational();
 }