]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/common: move write_file into crimson namespace
authorKefu Chai <kchai@redhat.com>
Wed, 29 Jul 2020 07:52:00 +0000 (15:52 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 30 Jul 2020 06:41:46 +0000 (14:41 +0800)
it simply does not belong to ceph::buffer

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/common/buffer_io.cc
src/crimson/common/buffer_io.h
src/crimson/os/cyanstore/cyan_store.cc
src/crimson/osd/main.cc

index 7bdab058974335c27cd1e8423f71319dd950a1ba..68355684559e7cb41f55ed9de614e51e39df1182 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "include/buffer.h"
 
-namespace ceph::buffer {
+namespace crimson {
 
 seastar::future<> write_file(ceph::buffer::list&& bl,
                              seastar::sstring fn,
index 5cc6a6e97b7bc93e4e26cece6f856f0812cbc400..0a98ec58fc207765389c7ea2dee21e027c76bfe0 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "include/buffer_fwd.h"
 
-namespace ceph::buffer {
+namespace crimson {
   seastar::future<> write_file(ceph::buffer::list&& bl,
                                seastar::sstring fn,
                                seastar::file_permissions= // 0644
index 77c9799755dd22898bf34905c83606ec81f01630..4ba19f67effbad245c9b58f5d0a15963847a1146 100644 (file)
@@ -71,12 +71,12 @@ seastar::future<> CyanStore::umount()
       ceph_assert(ch);
       ch->encode(bl);
       std::string fn = fmt::format("{}/{}", path, col);
-      return ceph::buffer::write_file(std::move(bl), fn);
+      return crimson::write_file(std::move(bl), fn);
     }).then([&collections, this] {
       ceph::bufferlist bl;
       ceph::encode(collections, bl);
       std::string fn = fmt::format("{}/collections", path);
-      return ceph::buffer::write_file(std::move(bl), fn);
+      return crimson::write_file(std::move(bl), fn);
     });
   });
 }
@@ -110,7 +110,7 @@ seastar::future<> CyanStore::mkfs(uuid_d new_osd_fsid)
     ceph::bufferlist bl;
     std::set<coll_t> collections;
     ceph::encode(collections, bl);
-    return ceph::buffer::write_file(std::move(bl), fn);
+    return crimson::write_file(std::move(bl), fn);
   }).then([this] {
     return write_meta("type", "memstore");
   });
index 743ff43071db5ec97cf8916db0c47a2737888df4..adce07981d39e490923a88aa042a1530005fafbb 100644 (file)
@@ -98,7 +98,7 @@ seastar::future<> make_keyring()
       keyring.encode_plaintext(bl);
       const auto permissions = (seastar::file_permissions::user_read |
                               seastar::file_permissions::user_write);
-      return ceph::buffer::write_file(std::move(bl), path, permissions);
+      return crimson::write_file(std::move(bl), path, permissions);
     }
   }).handle_exception_type([path](const fs::filesystem_error& e) {
     seastar::fprint(std::cerr, "FATAL: writing new keyring to %s: %s\n", path, e.what());