From 2a0b88168518dc6a2c374233f3524c188024c170 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sun, 23 Jan 2022 22:05:23 +0300 Subject: [PATCH] Respect max_write_iodepth for deletes --- src/blockstore_write.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/blockstore_write.cpp b/src/blockstore_write.cpp index 824f4f8f..1fd9e9ab 100644 --- a/src/blockstore_write.cpp +++ b/src/blockstore_write.cpp @@ -629,13 +629,17 @@ int blockstore_impl_t::dequeue_del(blockstore_op_t *op) { return 0; } - write_iodepth++; // Write current journal sector only if it's dirty and full, or in the immediate_commit mode BS_SUBMIT_CHECK_SQES( (immediate_commit != IMMEDIATE_NONE || (journal_block_size - journal.in_sector_pos) < sizeof(journal_entry_del) && journal.sector_info[journal.cur_sector].dirty) ? 1 : 0 ); + if (write_iodepth >= max_write_iodepth) + { + return 0; + } + write_iodepth++; // Prepare journal sector write if (immediate_commit == IMMEDIATE_NONE) {