diff options
author | Adam Manzanares <nmtadam@gmail.com> | 2013-05-10 13:14:54 -0700 |
---|---|---|
committer | Adam Manzanares <nmtadam@gmail.com> | 2013-05-10 13:23:39 -0700 |
commit | e5e090057d701ef81919b3c1368953700c185c81 (patch) | |
tree | ddb8806708390c5004dab95983bf4ce6c622336c | |
parent | 399d278e603d9b47f92136b9bd7679978d3b2535 (diff) | |
download | fusepy-e5e090057d701ef81919b3c1368953700c185c81.tar.gz |
loopback example fsync update
No longer ignoring the datasync parameter.
-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', |