Finally, found way to keep fsync and solve the problem:
1) /usr/lib/calibre/calibre/__init__.py
just added after os.utime:
os.system("sync")
2) /usr/lib/calibre/calibre/utils/filenames.py (yeah, there is os.fsync but no utime...)
added after os.fsync (but need more pretty code):
os.utime(os.path.join(cpath, fname), None)
os.system("sync")
My Kindle + Calibre is alive again !
|