]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/filestore: call committed_thru when no journal entries are replayed 15781/head
authorKuan-Kai Chiu <big.chiu@bigtera.com>
Tue, 20 Jun 2017 13:57:21 +0000 (21:57 +0800)
committerKuan-Kai Chiu <big.chiu@bigtera.com>
Tue, 20 Jun 2017 13:57:21 +0000 (21:57 +0800)
As described in commit message of 8924158, we should call committed_thru
when no journal entries are replayed in case journal is full but not
trimmed yet.

Signed-off-by: Kuan-Kai Chiu <big.chiu@bigtera.com>
src/os/filestore/FileJournal.cc
src/os/filestore/JournalingObjectStore.cc

index 7e6a19cbf0e1f66c4037d2ff33bca696e8121df7..649e4460f22d6f272ff85604e5b6ff9be18dcc17 100644 (file)
@@ -460,15 +460,6 @@ int FileJournal::open(uint64_t fs_op_seq)
   read_pos = header.start;
   uint64_t seq = header.start_seq;
 
-  // last_committed_seq is 1 before the start of the journal or
-  // 0 if the start is 0
-  last_committed_seq = seq > 0 ? seq - 1 : seq;
-  if (last_committed_seq < fs_op_seq) {
-    dout(2) << "open advancing committed_seq " << last_committed_seq
-           << " to fs op_seq " << fs_op_seq << dendl;
-    last_committed_seq = fs_op_seq;
-  }
-
   while (1) {
     bufferlist bl;
     off64_t old_pos = read_pos;
@@ -861,7 +852,7 @@ int FileJournal::prepare_multi_write(bufferlist& bl, uint64_t& orig_ops, uint64_
           }
           print_header(header);
         }
-        
+
         return -ENOSPC;  // hrm, full on first op
       }
       if (eleft) {
@@ -1417,7 +1408,7 @@ int FileJournal::write_aio_bl(off64_t& pos, bufferlist& bl, uint64_t seq)
     aio_lock.Unlock();
 
     iocb *piocb = &aio.iocb;
-    
+
     // 2^16 * 125us = ~8 seconds, so max sleep is ~16 seconds
     int attempts = 16;
     int delay = 125;
index 7679d802969ffb940b59d4a03ec3b03eb95bac06..a9c528f0482d080ccfbf287916499ce476072542 100644 (file)
@@ -111,6 +111,9 @@ int JournalingObjectStore::journal_replay(uint64_t fs_op_seq)
   if (err < 0)
     return err;
 
+  if (!count)
+    journal->committed_thru(fs_op_seq);
+
   return count;
 }