From c0e932b45b9494a24f8ce3c6c0b317ba5b73b5d6 Mon Sep 17 00:00:00 2001 From: Damien Thenot Date: Wed, 9 Oct 2024 16:20:46 +0200 Subject: [PATCH] linstor: Fix to add sync to DD Signed-off-by: Damien Thenot --- drivers/util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/util.py b/drivers/util.py index 5d7b320b0..962802925 100755 --- a/drivers/util.py +++ b/drivers/util.py @@ -610,7 +610,7 @@ def zeroOut(path, fromByte, bytes): bytesBefore = bytes bytes -= bytesBefore cmd = [CMD_DD, "if=/dev/zero", "of=%s" % path, "bs=1", - "seek=%s" % fromByte, "count=%s" % bytesBefore] + "seek=%s" % fromByte, "count=%s" % bytesBefore, "conv=fsync"] try: pread2(cmd) except CommandException: @@ -621,7 +621,7 @@ def zeroOut(path, fromByte, bytes): fromByte = (fromBlock + blocks) * blockSize if blocks: cmd = [CMD_DD, "if=/dev/zero", "of=%s" % path, "bs=%s" % blockSize, - "seek=%s" % fromBlock, "count=%s" % blocks] + "seek=%s" % fromBlock, "count=%s" % blocks, "conv=fsync"] try: pread2(cmd) except CommandException: @@ -629,7 +629,7 @@ def zeroOut(path, fromByte, bytes): if bytes: cmd = [CMD_DD, "if=/dev/zero", "of=%s" % path, "bs=1", - "seek=%s" % fromByte, "count=%s" % bytes] + "seek=%s" % fromByte, "count=%s" % bytes, "conv=fsync"] try: pread2(cmd) except CommandException: