1. 21 Aug, 2017 1 commit
  2. 23 Mar, 2017 1 commit
  3. 24 Jan, 2017 2 commits
  4. 17 Jan, 2017 1 commit
  5. 25 May, 2016 1 commit
    • Ondrej Holy's avatar
      fuse: Add GVFS_DEBUG_FUSE to enable debug output · 1e5662bb
      Ondrej Holy authored
      It was not possible to enable debug output from the fuse daemon without
      rebuilding. This patch replaces custom debug handling in the similar way
      as it is done in other daemons (using GLib logging functionality).
      Environment variable GVFS_DEBUG_FUSE can be specified in order to enable
      debugging and SIGUSR2 signal can be sent also to toggle debug output.
      The debug output will be printed at stdout, so the debug output can be
      seen on gvfsd output thanks to the commit 85bacbf0.
      1e5662bb
  6. 11 Mar, 2016 2 commits
  7. 07 Mar, 2016 1 commit
  8. 05 Jan, 2016 1 commit
  9. 26 Oct, 2014 6 commits
    • Ross Lagerwall's avatar
      fuse: Pass the correct flags when reopening output stream · 58db1bd0
      Ross Lagerwall authored
      If a file is open for reading and writing, ensure to pass the O_APPEND
      flag if necessary when reopening the output stream.  This allows a
      write-read-write sequence to work properly if the file is opened for
      O_APPEND.  The O_TRUNC flag is not passed since this would cause a
      write-read-write sequence to truncate the file on the second write.  As
      it is, the second write fails with ENOTSUP since this kind of operation
      is not supported by GVFS.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=632296
      58db1bd0
    • Ross Lagerwall's avatar
      fuse: Close stream on release rather than flush · 1ff4d6c1
      Ross Lagerwall authored
      Before, if an application created, dup()ed the fd and then closed it,
      the stream would be closed.  When attempting to write to the original
      fd, reopening the stream would fail since it is an error to open an
      existing file without either truncating it or appending to it.
      
      Close the stream on release() rather than flush() to fix this since
      release() is called only once per open/create rather than for each
      close.  Since g_output_stream_flush() is called after every write,
      flush() and fsync() are unnecessary.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=632296
      1ff4d6c1
    • Ross Lagerwall's avatar
      fuse: Track the size of open files properly · 3800f529
      Ross Lagerwall authored
      Previously, if a getattr() for an open file could not get the size
      information, the file position was returned as the size.  This is
      incorrect if seek or ftruncate had previously been used on the stream.
      
      Instead, track the size of the open file and return this value.  In
      addition, use this size in preference to the size returned by
      g_file_query_info() if a stream is open (this only happens if the stream
      doesn't support g_file_query_info_on_write()) since the tracked size is
      more likely to be correct due to implementing g_file_replace by writing
      to a temporary file.  Tracking the size is only necessary for files
      which are created or opened with O_TRUNC since files opened with
      O_APPEND will be appended in-place.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=632296
      3800f529
    • Ross Lagerwall's avatar
      fuse: Don't g_file_append_to unless O_APPEND is given · 548ba46c
      Ross Lagerwall authored
      Because g_file_append_to opens an output stream that can only append
      regardless of the seek position, only use g_file_append_to when O_APPEND
      is actually specified.  This prevents file corruption when the mode is
      O_WRONLY or O_RDWR without O_APPEND.
      
      Note that this means opening a file with a bare O_WRONLY or O_RDWR
      returns ENOTSUP since there is no equivalent in gvfs.
      
      Furthermore, don't attempt to seek when the file mode is O_APPEND since
      this is unnecessary.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=632296
      548ba46c
    • Ross Lagerwall's avatar
      fuse: Truncate stream rather than path if possible · f6f99e22
      Ross Lagerwall authored
      When truncating, if a writable stream is open, truncate that rather than
      using g_file_replace on the path since that fails to have the desired
      effect if replace is implemented by writing to a temporary and then
      renaming.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=632296
      f6f99e22
    • Ross Lagerwall's avatar
      fuse: Use query_info_on_{read,write} if a stream is open · 8dc5941c
      Ross Lagerwall authored
      If a stream is open and it supports query_info_on_{read,write}, use that
      in preference to querying the file using the path.  This causes the
      correct information to be retrieved when g_file_replace is implemented
      by writing to a temporary file, rather than the information of the
      yet-to-be-replaced file.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=632296
      8dc5941c
  10. 09 Aug, 2014 2 commits
  11. 11 Apr, 2014 1 commit
  12. 30 Nov, 2013 1 commit
  13. 15 Nov, 2013 1 commit
  14. 08 Oct, 2013 1 commit
  15. 02 Oct, 2013 3 commits
    • Ross Lagerwall's avatar
      fuse: Make file nonseekable if it actually is · 50e92721
      Ross Lagerwall authored and Alexander Larsson's avatar Alexander Larsson committed
      Instead of failing in read() with ENOTSUPP after the lseek on a
      nonseekable stream succeeds, make the lseek fail with ESPIPE, as it
      should.  This is important for applications which test the return value
      of lseek to determine if the file descriptor is seekable.
      50e92721
    • Ross Lagerwall's avatar
      fuse: Enforce sync_read · 3e8cc556
      Ross Lagerwall authored and Alexander Larsson's avatar Alexander Larsson committed
      When running multithreaded, fuse can issue readahead requests out of
      order which can cause subsequent reads to fail with ENOTSUPP (if seeking
      backward is not supported on the stream).
      
      Force readahead to occur in order to prevent this problem.
      3e8cc556
    • Ross Lagerwall's avatar
      fuse: Fix seek offset calculation · 64ccbde1
      Ross Lagerwall authored and Alexander Larsson's avatar Alexander Larsson committed
      Since fh->pos is already incremented by n_bytes_skipped, check if
      offset == fh->pos.
      
      This error was hidden by the fact that the operation is retried when
      -EIO is returned.  When it was retried, the stream was already in the
      correct position and so no seek operation was required.
      64ccbde1
  16. 02 Apr, 2013 1 commit
  17. 17 Jan, 2013 1 commit
  18. 07 Dec, 2012 1 commit
  19. 30 Oct, 2012 1 commit
  20. 01 Oct, 2012 1 commit
  21. 30 Aug, 2012 1 commit
  22. 31 Jul, 2012 3 commits
  23. 30 Jul, 2012 1 commit
  24. 25 Jun, 2012 1 commit
  25. 20 Jun, 2012 1 commit
    • Tomáš Bžatek's avatar
      fuse: Support ftruncate() where requested size > current size · b6164bc1
      Tomáš Bžatek authored
      When ftruncate is called with a size greater than the current size
      of the file, the expected behavior is that the file size increases to
      the requested size, and the new space is zero-filled.  SQLite depends
      on this behavior when opening a database using 'write-ahead log'
      journaling.
      
      Based on original patch by Jeff Smith <whydoubt@yahoo.com>
      b6164bc1
  26. 18 Jan, 2012 1 commit
  27. 14 Nov, 2011 1 commit
    • Tomáš Bžatek's avatar
      Explicitly intialize mutexes on stack · 47a61b04
      Tomáš Bžatek authored
      Turned out zeroing memory is not enough in some cases so let's be
      on the safe side and properly initialize all non-static mutexes.
      Also, don't initialize/clear the static ones.
      47a61b04
  28. 26 Oct, 2011 1 commit