dd with direct io is less impacting on Dom0 kernel resources

Signed-off-by: Daan Hoogland <daan@onecht.net>
(cherry picked from commit c4b78c3aaa8df20c8e892b9d5108d8f34f96ed0c)
This commit is contained in:
Joris van Lieshout 2014-08-11 17:12:23 +02:00 committed by Daan Hoogland
parent 6568e0bb31
commit 37baddd721

View File

@ -201,7 +201,7 @@ def copyfile(fromFile, toFile, isISCSI):
logging.debug("Starting to copy " + fromFile + " to " + toFile)
errMsg = ''
try:
cmd = ['dd', 'if=' + fromFile, 'of=' + toFile, 'bs=4M']
cmd = ['dd', 'if=' + fromFile, 'iflag=direct', 'of=' + toFile, 'oflag=direct', 'bs=4M']
txt = util.pread2(cmd)
except:
try: