]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/os/bluestore/KernelDevice.cc
update sources to 12.2.10
[ceph.git] / ceph / src / os / bluestore / KernelDevice.cc
index 6c2d5ec1bf16fd719b85df6c1508ee124ac23031..e587491332716710de24099c730ae59b3c2d16fd 100644 (file)
@@ -67,13 +67,13 @@ int KernelDevice::open(const string& p)
   int r = 0;
   dout(1) << __func__ << " path " << path << dendl;
 
-  fd_direct = ::open(path.c_str(), O_RDWR | O_DIRECT);
+  fd_direct = ::open(path.c_str(), O_RDWR | O_DIRECT | O_CLOEXEC);
   if (fd_direct < 0) {
     r = -errno;
     derr << __func__ << " open got: " << cpp_strerror(r) << dendl;
     return r;
   }
-  fd_buffered = ::open(path.c_str(), O_RDWR);
+  fd_buffered = ::open(path.c_str(), O_RDWR | O_CLOEXEC);
   if (fd_buffered < 0) {
     r = -errno;
     derr << __func__ << " open got: " << cpp_strerror(r) << dendl;
@@ -163,9 +163,9 @@ int KernelDevice::open(const string& p)
   dout(1) << __func__
          << " size " << size
          << " (0x" << std::hex << size << std::dec << ", "
-         << pretty_si_t(size) << "B)"
+         << byte_u_t(size) << ")"
          << " block_size " << block_size
-         << " (" << pretty_si_t(block_size) << "B)"
+         << " (" << byte_u_t(block_size) << ")"
          << " " << (rotational ? "rotational" : "non-rotational")
          << dendl;
   return 0;