From d56cb290ee27690a88b9fa8f0ed4e6e93b84cad2 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Thu, 28 Nov 2019 01:00:22 +0300 Subject: [PATCH] Two FIXMEs --- blockstore_flush.cpp | 1 + blockstore_write.cpp | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blockstore_flush.cpp b/blockstore_flush.cpp index 6b18befce..d11239327 100644 --- a/blockstore_flush.cpp +++ b/blockstore_flush.cpp @@ -181,6 +181,7 @@ resume_0: if (dirty_it->second.state == ST_J_STABLE && !skip_copy) { // First we submit all reads + // FIXME: Introduce a (default) mode where we'll keep the whole journal in memory instead of re-reading data during flush offset = dirty_it->second.offset; len = dirty_it->second.len; it = v.begin(); diff --git a/blockstore_write.cpp b/blockstore_write.cpp index 5134ed9a0..c21922e8c 100644 --- a/blockstore_write.cpp +++ b/blockstore_write.cpp @@ -72,9 +72,8 @@ int blockstore::dequeue_write(blockstore_operation *op) int vcnt = 0; if (op->version == 1 && op->len != block_size) { - // zero fill newly allocated object - // This thing turns new small writes into big writes - // So FIXME: consider writing an empty big_write as version 1 instead of zero-filling here + // Zero fill newly allocated object. First write is always a big write + // FIXME: Add "no-zero-fill" mode which will just leave random garbage (insecure, but may be useful) if (op->offset > 0) op->iov_zerofill[vcnt++] = (struct iovec){ zero_object, op->offset }; op->iov_zerofill[vcnt++] = (struct iovec){ op->buf, op->len };