From d0c8fe7e69132aaa6372c9f1427192423f27910f Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Thu, 26 Mar 2020 15:50:28 +0800 Subject: [PATCH] os/bluestore: remove incorrectly comments. Signed-off-by: Jianpeng Ma --- src/os/bluestore/BlueFS.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 7dfbbc4afda..fbb5958e108 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -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"; -- 2.39.5