Bug 1295007
Summary: | Non-GIO (POSIX) API call to save data truncates file to 0 bytes. | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Benjamin Ariel Nava Martinez <arielnmz> |
Component: | gvfs | Assignee: | Ondrej Holy <oholy> |
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 23 | CC: | alexl, bnocera, oholy |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-12-20 17:31:19 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Benjamin Ariel Nava Martinez
2015-12-31 18:22:04 UTC
Thanks for your bug report. GIO API isn't fully compatible with POSIX and thus some operations might not be supported. However it is not definitely true that all "POSIX editors" doesn't work, I would say that most of the editors should work, e.g. nano works (first one I tried)... It seems leafpad is doing something bit nonstandard, because it is using two file descriptors for writing: open("/run/user/1000/gvfs/ftp:host=foo/bar", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 10 ... open("/run/user/1000/gvfs/ftp:host=foo/bar", O_WRONLY|O_CREAT|O_APPEND, 0666) = 11 lseek(11, 0, SEEK_END) = -1 ESPIPE (Illegal seek) close(11) = 0 ... write(10, "foobar", 6) = -1 EOPNOTSUPP (Operation not supported) close(10) As a result fuse calls vfs_write without O_APPEND, nor O_TRUNC: vfs_open: /ftp:host=foo/bar open_common: flags=101001 vfs_open: -> Success ... vfs_open: /ftp:host=foo/bar open_common: flags=102001 vfs_open: -> Success vfs_release: /ftp:host=foo/bar file_handle_close_stream ... vfs_write: /ftp:host=foo/bar vfs_write: flags=100001 vfs_write: -> Operation not supported vfs_release: /ftp:host=foo/bar file_handle_close_stream file_handle_close_stream This is not supported by the fuse daemon, because it might cause data corruptions due to the divergence of POSIX and GIO API, see: https://bugzilla.gnome.org/show_bug.cgi?id=632296 I'm not sure if we can improve it somehow in GVfs, but I suppose it can be easily fixed in leafpad (e.g. adding O_APPEND for the first open)... There is also problem with invalidation ftp cache after writing, which might cause POSIX editors fails to read file content over fuse daemon after successful write: https://bugzilla.gnome.org/show_bug.cgi?id=760159 Thank you for your response, this is a leafpad-related bug then, if I understand correctly. This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '23'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 23 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. |