summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-01-18 17:03:14 +0100
committerSimon Rettberg2024-01-18 17:03:14 +0100
commitfe9c6275b38c95f10aba2fd25977e57721df5d4e (patch)
tree6d998a4114fb9cbd08108e16e50c82abb20d7623
parent[SERVER] Log errno if opening image file fails (diff)
downloaddnbd3-fe9c6275b38c95f10aba2fd25977e57721df5d4e.tar.gz
dnbd3-fe9c6275b38c95f10aba2fd25977e57721df5d4e.tar.xz
dnbd3-fe9c6275b38c95f10aba2fd25977e57721df5d4e.zip
[KERNEL] Set fake RTT to 500ms on manual server switch
5ms was apparently way too low and lead to frequent switch-aways from the local dnbd3-server on heavy load during bootup.
-rw-r--r--src/kernel/blk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/blk.c b/src/kernel/blk.c
index fb6a103..2d733b1 100644
--- a/src/kernel/blk.c
+++ b/src/kernel/blk.c
@@ -225,8 +225,8 @@ static int dnbd3_blk_ioctl(struct block_device *bdev, fmode_t mode, unsigned int
alt_server->best_count = 100;
} else {
for (j = 0; j < DISCOVER_HISTORY_SIZE; ++j)
- if (alt_server->rtts[j] < 5000)
- alt_server->rtts[j] = 5000;
+ if (alt_server->rtts[j] < 500000)
+ alt_server->rtts[j] = 500000;
alt_server->best_count = 0;
}
}