minor file journal size bug
diff mbox

Message ID 4C163A7E.6060701@mcs.anl.gov
State New, archived
Headers show

Commit Message

Phil Carns June 14, 2010, 2:19 p.m. UTC
None

Patch
diff mbox

diff -Naupr ceph-0.20.2/src/os/FileJournal.cc ceph-0.20.2-patched/src/os/FileJournal.cc
--- ceph-0.20.2/src/os/FileJournal.cc	2010-05-26 18:52:59.000000000 -0500
+++ ceph-0.20.2-patched/src/os/FileJournal.cc	2010-06-14 08:54:22.416230668 -0500
@@ -58,8 +58,8 @@  int FileJournal::_open(bool forwrite, bo
   max_size = st.st_size;
   block_size = st.st_blksize;
 
-  if (create && max_size < (g_conf.osd_journal_size << 20)) {
-    uint64_t newsize = g_conf.osd_journal_size << 20;
+  if (create && max_size < (((uint64_t)g_conf.osd_journal_size) << 20)) {
+    uint64_t newsize = ((uint64_t)g_conf.osd_journal_size) << 20;
     dout(10) << "_open extending to " << newsize << " bytes" << dendl;
     r = ::ftruncate(fd, newsize);
     if (r == 0)