GNOME Bugzilla – Bug 760159
Invalidate ftp dir cache on write close
Last modified: 2016-02-09 11:31:04 UTC
Created attachment 318252 [details] [review] ftp: Invalidate dir cache on write close Wrong file size is returned if query_info is executed during write operation, because dir cache is invalidated on open_for_write. Wrong file size might cause POSIX editors fails to read file content over fuse daemon. Invalidate the cache also on close_write. The bug was found, when I was debugging following issue: https://bugzilla.redhat.com/show_bug.cgi?id=1295007
Review of attachment 318252 [details] [review]: I have made an addition testing and realized that the cache has to be invalidated, after the connection is already closed...
Created attachment 320700 [details] [review] ftp: Invalidate dir cache on write close So I have sightly modified the patch... Without patch: $ gvfs-save ftp://HOST/FILE < FILE & gvfs-info ftp://HOST/FILE | grep ^size [1] PID size: 0 [1]+ Done $ gvfs-info ftp://HOST/FILE | grep ^size size: 0 With patch: $ echo SOMECONTENT | gvfs-save ftp://HOST/FILE < FILE & gvfs-info ftp://HOST/FILE | grep ^size [1] PID size: 0 [1]+ Done $ gvfs-info ftp://HOST/FILE | grep ^size size: FILESIZE
Comment on attachment 320700 [details] [review] ftp: Invalidate dir cache on write close master: commit b161a2b4a7cf3b9f525caf26206df92d451fcb39 gnome-3-18: commit ea78c2bf2fdd357d69c50a66eb664cde76beb1b6