]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/filestore: use existing variable to assign newsize. 13742/head
authorPan Liu <pan.liu@istuary.com>
Mon, 6 Mar 2017 04:35:22 +0000 (12:35 +0800)
committerPan Liu <pan.liu@istuary.com>
Mon, 6 Mar 2017 04:35:22 +0000 (12:35 +0800)
Signed-off-by: Pan Liu <liupan1111@gmail.com>
src/os/filestore/FileJournal.cc

index 0781e2c6955f994cf91462aa2a7895abc0237950..5382a008ecb7a3ad4a69a1abcf0d1d4f76e53971 100644 (file)
@@ -189,9 +189,8 @@ int FileJournal::_open_file(int64_t oldsize, blksize_t blksize,
   }
 
   if (create && (oldsize < conf_journal_sz)) {
-    uint64_t newsize(cct->_conf->osd_journal_size);
-    newsize <<= 20;
-    dout(10) << "_open extending to " << newsize << " bytes" << dendl;
+    uint64_t newsize(conf_journal_sz);
+    dout(10) <<  __func__ << " _open extending to " << newsize << " bytes" << dendl;
     ret = ::ftruncate(fd, newsize);
     if (ret < 0) {
       int err = errno;