remoteloop: drop O_DIRECT
Appart from giving us a hard time on s390x, this feature did not seem to have a measurable effect. Moreover, O_DIRECT is not supported by tmpfs so without this patch we could not use tmpfs as backing store, which does speed up image generation considerably. Drop the flag and and rather put the store on tmpfs in order to speed things up.
This commit is contained in:
parent
1d588b8e86
commit
16dfd7eec1
1 changed files with 1 additions and 7 deletions
|
|
@ -4,7 +4,6 @@ import contextlib
|
|||
import errno
|
||||
import json
|
||||
import os
|
||||
import platform
|
||||
import socket
|
||||
import threading
|
||||
from . import loop
|
||||
|
|
@ -133,13 +132,8 @@ class LoopClient:
|
|||
def device(self, filename, offset=None, sizelimit=None):
|
||||
req = {}
|
||||
fds = array.array("i")
|
||||
oflags = os.O_RDWR
|
||||
|
||||
if platform.machine() != "s390x":
|
||||
# O_DIRECT will break s390x currently
|
||||
oflags |= os.O_DIRECT
|
||||
|
||||
fd = os.open(filename, oflags)
|
||||
fd = os.open(filename, os.O_RDWR)
|
||||
dir_fd = os.open("/dev", os.O_DIRECTORY)
|
||||
|
||||
fds.append(fd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue