]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: make _write_bdev_label static and public
authorSage Weil <sage@redhat.com>
Mon, 16 Oct 2017 22:42:29 +0000 (17:42 -0500)
committerSage Weil <sage@redhat.com>
Thu, 19 Oct 2017 13:22:16 +0000 (08:22 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 0b0550c967ae0d6ae49641c6859f0b63267e2cd9)

src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h

index d20f3aa8ecf42d7508556a5bce275c30772b32bc..f3d8d58679d76e5ac47b260deb23238c6eb02fd6 100644 (file)
@@ -3808,7 +3808,7 @@ int BlueStore::write_meta(const std::string& key, const std::string& value)
     return ObjectStore::write_meta(key, value);
   }
   label.meta[key] = value;
-  r = _write_bdev_label(p, label);
+  r = _write_bdev_label(cct, p, label);
   assert(r == 0);
   return ObjectStore::write_meta(key, value);
 }
@@ -4021,7 +4021,8 @@ void BlueStore::_close_path()
   path_fd = -1;
 }
 
-int BlueStore::_write_bdev_label(string path, bluestore_bdev_label_t label)
+int BlueStore::_write_bdev_label(CephContext *cct,
+                                string path, bluestore_bdev_label_t label)
 {
   dout(10) << __func__ << " path " << path << " label " << label << dendl;
   bufferlist bl;
@@ -4102,7 +4103,7 @@ int BlueStore::_check_or_set_bdev_label(
     label.size = size;
     label.btime = ceph_clock_now();
     label.description = desc;
-    int r = _write_bdev_label(path, label);
+    int r = _write_bdev_label(cct, path, label);
     if (r < 0)
       return r;
   } else {
index 39f88b9f8b558c755b047f825f18d49101f3bdfc..df42ffa8c44da0916572b302edb23efe41817996 100644 (file)
@@ -1982,8 +1982,9 @@ private:
   int _setup_block_symlink_or_file(string name, string path, uint64_t size,
                                   bool create);
 
-  int _write_bdev_label(string path, bluestore_bdev_label_t label);
 public:
+  static int _write_bdev_label(CephContext* cct,
+                              string path, bluestore_bdev_label_t label);
   static int _read_bdev_label(CephContext* cct, string path,
                              bluestore_bdev_label_t *label);
 private: