]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: remove incorrectly comments. 34196/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Thu, 26 Mar 2020 07:50:28 +0000 (15:50 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Thu, 26 Mar 2020 07:50:28 +0000 (15:50 +0800)
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/os/bluestore/BlueFS.cc

index 7dfbbc4afda6bfc5a74eb39474c31e181ed27f8d..fbb5958e108e915205a07db495f273a235403ae5 100644 (file)
@@ -1881,7 +1881,7 @@ int BlueFS::_read_random(
   FileReader *h,         ///< [in] read from here
   uint64_t off,          ///< [in] offset
   uint64_t len,          ///< [in] this many bytes
-  char *out)             ///< [out] optional: or copy it here
+  char *out)             ///< [out] copy it here
 {
   auto* buf = &h->buf;
 
@@ -1936,11 +1936,9 @@ int BlueFS::_read_random(
              << " 0x" << off << "~" << len << std::dec
              << dendl;
 
-      if (out) {
-       // NOTE: h->bl is normally a contiguous buffer so c_str() is free.
-       memcpy(out, buf->bl.c_str() + off - buf->bl_off, r);
-       out += r;
-      }
+      // NOTE: h->bl is normally a contiguous buffer so c_str() is free.
+      memcpy(out, buf->bl.c_str() + off - buf->bl_off, r);
+      out += r;
 
       dout(30) << __func__ << " result chunk (0x"
               << std::hex << r << std::dec << " bytes):\n";