diff options
-rwxr-xr-x | examples/loopback.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/loopback.py b/examples/loopback.py index b957a10..f311e31 100755 --- a/examples/loopback.py +++ b/examples/loopback.py @@ -34,8 +34,11 @@ class Loopback(LoggingMixIn, Operations): return os.fsync(fh) def fsync(self, path, datasync, fh): - return os.fsync(fh) - + if datasync != 0: + return os.fdatasync(fh) + else: + return os.fsync(fh) + def getattr(self, path, fh=None): st = os.lstat(path) return dict((key, getattr(st, key)) for key in ('st_atime', 'st_ctime', |