linux - python fsync() on network drive hangs -


i write data file using following function:

def writeto1file(self, output_file, text):     output_file.write(text)     output_file.flush()     os.fsync(output_file.fileno()) 

the fsync() call mandatory handle ioerror: if don't use when network drive unreachable, function write() works on local buffer , raises no exceptions.

the problem after few write operations, function fsync() hangs. related to? local machine linux running python 2.7. drives mounted mount.cifs. remote disk on local server reachable. if unmount remote disk, fsync() returns after few tens of seconds.

you try setting nostrictsync mount option.

there information regarding @ https://www.kernel.org/doc/readme/documentation-filesystems-cifs-readme.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -