Fix test_scrub with BIG_INTENTs

This commit is contained in:
Vitaliy Filippov
2025-12-02 01:52:12 +03:00
parent e55927076c
commit 3df410acc7
3 changed files with 37 additions and 13 deletions
+9 -1
View File
@@ -171,6 +171,9 @@ bool journal_flusher_co::loop()
else if (wait_state == 16) goto resume_16;
else if (wait_state == 17) goto resume_17;
else if (wait_state == 18) goto resume_18;
else if (wait_state == 19) goto resume_19;
else if (wait_state == 20) goto resume_20;
else if (wait_state == 21) goto resume_21;
resume_0:
wait_state = 0;
wait_count = 0;
@@ -182,7 +185,12 @@ resume_0:
bs->intent_write_counter = 0;
resume_17:
resume_18:
if (!trim_lsn(17))
resume_19:
if (!fsync_buffer(17))
return false;
resume_20:
resume_21:
if (!trim_lsn(20))
return false;
}
if (res == ENOENT && flusher->force_start > 0 && co_id == 0 &&
+19 -9
View File
@@ -224,7 +224,6 @@ enospc:
PRIV(op)->lsn = obj->lsn;
}
prepare_meta_block_write(PRIV(op)->modified_block);
intent_write_counter++;
PRIV(op)->pending_ops++;
PRIV(op)->op_state = 9;
write_iodepth++;
@@ -421,16 +420,27 @@ resume_8:
printf("Ack write %jx:%jx v%ju\n", op->oid.inode, op->oid.stripe, op->version);
#endif
op->retval = op->len;
if (PRIV(op)->write_type == BS_HEAP_BIG_INTENT ||
PRIV(op)->write_type == BS_HEAP_INTENT_WRITE ||
PRIV(op)->write_type == BS_HEAP_SMALL_WRITE)
heap->complete_lsn_write(PRIV(op)->lsn);
if (PRIV(op)->write_type == BS_HEAP_BIG_WRITE ||
PRIV(op)->write_type == BS_HEAP_BIG_INTENT ||
PRIV(op)->write_type == BS_HEAP_INTENT_WRITE)
if (PRIV(op)->write_type == BS_HEAP_BIG_WRITE)
{
unsynced_data_write_count++;
else if (PRIV(op)->write_type != BS_HEAP_DELETE)
}
else if (PRIV(op)->write_type == BS_HEAP_SMALL_WRITE)
{
unsynced_buffer_write_count++;
heap->complete_lsn_write(PRIV(op)->lsn);
}
else if (PRIV(op)->write_type == BS_HEAP_BIG_INTENT ||
PRIV(op)->write_type == BS_HEAP_INTENT_WRITE)
{
unsynced_data_write_count++;
intent_write_counter++;
heap->complete_lsn_write(PRIV(op)->lsn);
}
else if (PRIV(op)->write_type == _REDIRECT_INTENT)
{
unsynced_data_write_count++;
intent_write_counter++;
}
write_iodepth--;
FINISH_OP(op);
return 2;