]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/ObjectStore: is_rotational() interface
authorSage Weil <sage@redhat.com>
Thu, 1 Jun 2017 20:47:27 +0000 (16:47 -0400)
committerSage Weil <sage@redhat.com>
Fri, 2 Jun 2017 02:15:47 +0000 (22:15 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/ObjectStore.h

index 9c760a91c4457517a8a45392e714d4a9c1b1d730..71f5e80b17c5ff56d263aef22ac5d599edf1031c 100644 (file)
@@ -1561,6 +1561,20 @@ public:
   virtual bool wants_journal() = 0;  //< prefers a journal
   virtual bool allows_journal() = 0; //< allows a journal
 
+  /**
+   * is_rotational
+   *
+   * Check whether store is backed by a rotational (HDD) or non-rotational
+   * (SSD) device.
+   *
+   * This must be usable *before* the store is mounted.
+   *
+   * @return true for HDD, false for SSD
+   */
+  virtual bool is_rotational() {
+    return true;
+  }
+
   virtual bool can_sort_nibblewise() {
     return false;   // assume a backend cannot, unless it says otherwise
   }