浏览代码

Add debug log for aligned cache write

Tatsuhiro Tsujikawa 12 年之前
父节点
当前提交
85cd65a664
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/AbstractSingleDiskAdaptor.cc

+ 2 - 0
src/AbstractSingleDiskAdaptor.cc

@@ -105,6 +105,8 @@ void AbstractSingleDiskAdaptor::writeCache(const WrDiskCacheEntry* entry)
     }
     if(buflen == 0 && ((*i)->goff & 0xfff) == 0 && ((*i)->len & 0xfff) == 0) {
       // Already aligned. Write it without copy.
+      A2_LOG_DEBUG(fmt("Cache flush goff=%"PRId64", len=%lu",
+                       start, static_cast<unsigned long>((*i)->len)));
       writeData((*i)->data + (*i)->offset, (*i)->len, start);
       start += (*i)->len;
     } else {