From e86df4a2a2610f6a27bf67218d011226fa17c51b Mon Sep 17 00:00:00 2001 From: JiangYu Date: Sun, 18 Jul 2021 00:46:05 +0800 Subject: [PATCH] =?UTF-8?q?fix=20BLOCKSTORE=5FDEBUG,=20error:=20=E2=80=98d?= =?UTF-8?q?irty=5Fit=E2=80=99=20was=20not=20declared=20in=20this=20scope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: JiangYu --- src/blockstore_write.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/blockstore_write.cpp b/src/blockstore_write.cpp index 2a8b6b47..07a3b61f 100644 --- a/src/blockstore_write.cpp +++ b/src/blockstore_write.cpp @@ -478,15 +478,15 @@ resume_2: } resume_4: // Switch object state -#ifdef BLOCKSTORE_DEBUG - printf("Ack write %lx:%lx v%lu = state 0x%x\n", op->oid.inode, op->oid.stripe, op->version, dirty_it->second.state); -#endif { auto dirty_it = dirty_db.find((obj_ver_id){ .oid = op->oid, .version = op->version, }); assert(dirty_it != dirty_db.end()); +#ifdef BLOCKSTORE_DEBUG + printf("Ack write %lx:%lx v%lu = state 0x%x\n", op->oid.inode, op->oid.stripe, op->version, dirty_it->second.state); +#endif bool is_big = (dirty_it->second.state & BS_ST_TYPE_MASK) == BS_ST_BIG_WRITE; bool imm = is_big ? (immediate_commit == IMMEDIATE_ALL) : (immediate_commit != IMMEDIATE_NONE); if (imm)