assemblers/qemu/loop: open backing file O_DIRECT
This should improve performance and save memory as we don't need two page caches. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
f470c3f3a3
commit
816d111779
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ def mount_api(dest):
|
|||
|
||||
@contextlib.contextmanager
|
||||
def loop_device(loop_client, image, size, offset=0):
|
||||
fd = os.open(image, os.O_RDWR)
|
||||
fd = os.open(image, os.O_RDWR | os.O_DIRECT)
|
||||
devname = loop_client.create_device(fd, offset=offset, sizelimit=size)
|
||||
os.close(fd)
|
||||
path = f"/dev/{devname}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue