summaryrefslogtreecommitdiffstats
path: root/gluster/swift/common/fs_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'gluster/swift/common/fs_utils.py')
-rw-r--r--gluster/swift/common/fs_utils.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/gluster/swift/common/fs_utils.py b/gluster/swift/common/fs_utils.py
index afc0cfe..8b26fd0 100644
--- a/gluster/swift/common/fs_utils.py
+++ b/gluster/swift/common/fs_utils.py
@@ -32,7 +32,7 @@ class Fake_file(object):
return 0
def read(self, count):
- return 0
+ return None
def fileno(self):
return -1
@@ -265,6 +265,14 @@ def do_fsync(fd):
err.errno, '%s, os.fsync("%s")' % (err.strerror, fd))
+def do_fdatasync(fd):
+ try:
+ os.fdatasync(fd)
+ except OSError as err:
+ raise GlusterFileSystemOSError(
+ err.errno, '%s, os.fdatasync("%s")' % (err.strerror, fd))
+
+
def mkdirs(path):
"""
Ensures the path is a directory or makes it if not. Errors if the path