]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: skip redundant flush before journal segment trim
authorSage Weil <sage.weil@dreamhost.com>
Thu, 24 Mar 2011 03:37:04 +0000 (20:37 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Thu, 24 Mar 2011 16:29:00 +0000 (09:29 -0700)
Back in olden times when we would would wait for acks for some journal
writes, we did an extra wait_for_safe() before discarding a journal segment
to make sure anything being discarded was safely committed in newers
segments.  These days mds_log_unsafe is always false (and
journaler_safe is true), so we can skip this check.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/mds/journal.cc

index 32f501cf4598c188d96f1e78d1a5d9025a351a26..30c25c1cb0e4b10540715beb79dae3dda7e58175 100644 (file)
@@ -282,7 +282,7 @@ C_Gather *LogSegment::try_to_expire(MDS *mds)
   // audit handling of anchor transactions?
 
   // once we are otherwise trimmable, make sure journal is fully safe on disk.
-  if (!gather) {
+  if (g_conf.mds_log_unsafe && !gather) {
     if (!trimmable_at)
       trimmable_at = mds->mdlog->get_write_pos();