1. 11 Nov, 2019 1 commit
    • Ondrej Holy's avatar
      gdbus: Add workaround for deadlocks when cancelling jobs · a1e85eda
      Ondrej Holy authored
      GVfs calls gvfs_dbus_daemon_proxy_new() in cancelled signal handler which
      internally needs CONNECTION_LOCK(connection). The lock can be unfortunately
      held by gdbus worker thread which can call g_cancellable_disconnect(). This
      obviously leads to deadlocks. I don't see any reason why we have to block
      g_cancellable_disconnect() because of gvfs_dbus_daemon_proxy_new() resp.
      gvfs_dbus_daemon_call_cancel(). Let's call it over idle source to not block
      the cancelled signal handler in order to prevent the deadlocks.
      
      It would be better to fix this issue directly in gdbus codes, however, it
      is not fully clear to me, what is a proper way to fix this.
      
      glib#1023
      a1e85eda
  2. 28 Mar, 2017 1 commit
  3. 18 Nov, 2014 1 commit
  4. 25 Jul, 2014 1 commit
    • Simon McVittie's avatar
      GDaemonMount: invalidate mount cache whenever we unmount a mount · 2744d498
      Simon McVittie authored
      Otherwise, the old mount info, and in particular the (D-Bus unique name,
      object path) pair representing it in its backend, will remain in
      the cache until the backend process exits, which could take time.
      Re-mounting and re-unmounting that mount would fail, because the
      second Unmount() call would go to the unique name and object path of
      the backend object that was destroyed by the first Unmount call,
      not the backend object that is now responsible.
      
      I'm using the Unmount reply rather than a signal, for thread-safety;
      the mount cache is global, so if it was listening for the Unmounted
      signal, that signal would be queued up for delivery to some
      specific main-context, call it A. If another thread did the
      umount/mount/unmount in main context B, before main context A was
      dispatched, then the invalidation would be too late to help it.
      
      This does not cover concurrent mount/unmount in two distinct main
      contexts without any synchronization. However, if two threads in
      main contexts B and C race to mount/unmount a share, then they're
      sometimes going to lose anyway, and there isn't a great deal that
      cache invalidation can do to help them.
      2744d498
  5. 30 Nov, 2013 1 commit
  6. 26 Sep, 2013 2 commits
  7. 11 Sep, 2012 1 commit
  8. 21 Aug, 2012 1 commit
  9. 31 Jul, 2012 9 commits
  10. 30 Jul, 2012 1 commit
  11. 21 Oct, 2011 1 commit
  12. 25 May, 2011 2 commits
  13. 16 Mar, 2011 1 commit
  14. 07 Dec, 2010 1 commit
  15. 27 May, 2010 1 commit
  16. 19 Aug, 2009 1 commit
  17. 25 Jun, 2009 1 commit
    • Benjamin Otte's avatar
      try extra hard to make sure operations get cancelled properly · c372064a
      Benjamin Otte authored
      Previously there were some rather big windows that allowed for races
      between cancelling and calling g_simple_async_result_complete().
      This code makes sure we check for cancellaton right before calling
      g_simple_async_result_complete(), which gets rid of that window and
      gives you the guarantee that cancelling an operation in the main thread
      will indeed return a CANCELLED error.
      c372064a
  18. 17 Jun, 2009 1 commit
  19. 18 Feb, 2009 1 commit
  20. 02 Aug, 2008 1 commit
  21. 31 Mar, 2008 1 commit
    • Alexander Larsson's avatar
      In call_sync, on stale cache errors due to a mount daemon disappearing, · 44cef08f
      Alexander Larsson authored
      2008-03-31  Alexander Larsson  <alexl@redhat.com>
      
              * client/gvfsdaemondbus.[ch]:
      	In call_sync, on stale cache errors due to a
      	mount daemon disappearing, invalidate caches and
      	return G_VFS_ERROR_RETRY so that the caller can
      	retry with fresh caches.
      	
              * client/gdaemonfile.c:
      	Retry calls on G_VFS_ERROR_RETRY.
      
      
      
      svn path=/trunk/; revision=1704
      44cef08f
  22. 14 Dec, 2007 1 commit
    • Alexander Larsson's avatar
      Only use <gio/gio.h> include · db4f9fdf
      Alexander Larsson authored
      2007-12-14  Alexander Larsson  <alexl@redhat.com>
      
              * client/gdaemondirectorymonitor.c:
              * client/gdaemondirectorymonitor.h:
              * client/gdaemonfile.c:
              * client/gdaemonfile.h:
              * client/gdaemonfileenumerator.c:
              * client/gdaemonfileenumerator.h:
              * client/gdaemonfileinputstream.c:
              * client/gdaemonfileinputstream.h:
              * client/gdaemonfilemonitor.c:
              * client/gdaemonfilemonitor.h:
              * client/gdaemonfileoutputstream.c:
              * client/gdaemonfileoutputstream.h:
              * client/gdaemonmount.c:
              * client/gdaemonmount.h:
              * client/gdaemonvfs.c:
              * client/gdaemonvfs.h:
              * client/gdaemonvolumemonitor.h:
              * client/gvfsdaemondbus.c:
              * client/gvfsdaemondbus.h:
              * client/gvfsfusedaemon.c:
              * client/gvfsurimapper.h:
              * client/smburi.c:
              * common/gdbusutils.c:
              * common/gdbusutils.h:
              * common/gmountoperationdbus.c:
              * common/gmountoperationdbus.h:
              * common/gmountsource.c:
              * common/gmountsource.h:
              * common/gsysutils.c:
              * common/gvfsdaemonprotocol.c:
              * common/gvfsdaemonprotocol.h:
              * daemon/gvfsbackend.h:
              * daemon/gvfsbackendftp.c:
              * daemon/gvfsbackendsftp.c:
              * daemon/gvfsbackendsmb.c:
              * daemon/gvfsbackendsmbbrowse.c:
              * daemon/gvfsbackendtest.c:
              * daemon/gvfsbackendtrash.c:
              * daemon/gvfsdaemonutils.c:
              * daemon/gvfsjob.c:
              * daemon/gvfsjob.h:
              * daemon/gvfsjobcopy.h:
              * daemon/gvfsjobcreatemonitor.h:
              * daemon/gvfsjobdelete.h:
              * daemon/gvfsjobenumerate.h:
              * daemon/gvfsjobmakedirectory.h:
              * daemon/gvfsjobmakesymlink.h:
              * daemon/gvfsjobmount.h:
              * daemon/gvfsjobmountmountable.h:
              * daemon/gvfsjobmove.h:
              * daemon/gvfsjobqueryattributes.h:
              * daemon/gvfsjobqueryfsinfo.h:
              * daemon/gvfsjobqueryinfo.h:
              * daemon/gvfsjobsetattribute.h:
              * daemon/gvfsjobsetdisplayname.h:
              * daemon/gvfsjobtrash.h:
              * daemon/gvfsjobunmount.h:
              * daemon/gvfsmonitor.h:
              * daemon/mount.c:
              * daemon/mount.h:
              * programs/gvfs-cat.c:
              * programs/gvfs-copy.c:
              * programs/gvfs-info.c:
              * programs/gvfs-ls.c:
              * programs/gvfs-monitor-dir.c:
              * programs/gvfs-monitor-file.c:
              * programs/gvfs-mount.c:
              * programs/gvfs-move.c:
              * programs/gvfs-rm.c:
              * programs/gvfs-save.c:
              * programs/gvfs-trash.c:
              * test/benchmark-gvfs-big-files.c:
              * test/benchmark-gvfs-small-files.c:
              * test/benchmark-posix-big-files.c:
              * test/benchmark-posix-small-files.c:
      	Only use <gio/gio.h> include 
      
      
      svn path=/trunk/; revision=1039
      db4f9fdf
  23. 14 Nov, 2007 1 commit
    • Alexander Larsson's avatar
      Make sure we somewhat cleanly handle the various dbus daemons going down. · 08c4d5ab
      Alexander Larsson authored
      2007-11-14  Alexander Larsson  <alexl@redhat.com>
      
              * client/gdaemonvfs.[ch]:
              * client/gvfsdaemondbus.c:
      	Make sure we somewhat cleanly handle the
      	various dbus daemons going down. By somewhat
      	I mean that no problem should be persistant
      	even if you might get some transient error
      	messages.
      
      	Unfortunately the only way to be able to cleanly
      	handle this involves globally ignoring SIGPIPE.
      	What can I say, unix sucks.
      	
              * common/gsysutils.c:
              (_g_socket_receive_fd):
      	Handle errors if e.g. the fd is closed
      
      
      svn path=/trunk/; revision=1023
      08c4d5ab
  24. 01 Nov, 2007 1 commit
  25. 08 Oct, 2007 1 commit
    • Alexander Larsson's avatar
      Add defines for monitoring · 6f6ab730
      Alexander Larsson authored
      2007-10-08  Alexander Larsson  <alexl@redhat.com>
      
              * common/gvfsdaemonprotocol.h:
      	Add defines for monitoring
      	
              * client/Makefile.am:
              * client/gdaemondirectorymonitor.[ch]: 
              * client/gdaemonfilemonitor.[ch]:
              * client/gdaemonfile.c:
      	Add daemon directory monitor and initial work on file monitor
      	
              * client/gdaemonfileenumerator.c:
      	Make path_counter private
      	Return DBUS_HANDLER_RESULT_HANDLED when handling messages.
      	
              * client/gdaemonvfs.[ch]:
      	Make _g_mount_ref_ref "public"
      	
              * client/gvfsdaemondbus.c:
      	Handle NULL callbacks for async calls
      	
              * daemon/Makefile.am:
              * daemon/gvfsbackend.[ch]:
              * daemon/gvfsjobcreatemonitor.[ch]:
      	Add create_dir_monitor and create_file_monitor.
      	Add g_vfs_backend_get_daemon
      	
              * daemon/gvfsmonitor.[ch]:
      	Helper code for monitors
      	
              * daemon/gvfsbackendtrash.c:
      	Implement directory monitor for trash dirs
      
      
      
      svn path=/trunk/; revision=971
      6f6ab730
  26. 25 Sep, 2007 2 commits
    • Alexander Larsson's avatar
      Clear VfsConnectionData on creation (fixes read of uninitialized data on · 859df2b3
      Alexander Larsson authored
      2007-09-25  Alexander Larsson  <alexl@redhat.com>
      
              * client/gvfsdaemondbus.c:
      	Clear VfsConnectionData on creation
      	(fixes read of uninitialized data on thread shutdown)
      	
              * daemon/sftp.mount.in:
      	Correct the type to "sftp"
      
      
      svn path=/trunk/; revision=962
      859df2b3
    • Alexander Larsson's avatar
      Pass in DBusConnection to use instead of using default one · 1cd0ca1e
      Alexander Larsson authored
      2007-09-25  Alexander Larsson  <alexl@redhat.com>
      
              * common/gmountoperationdbus.[ch]:
              * common/gmounttracker.[ch]:
      	Pass in DBusConnection to use instead of using default one
      	
              * client/gdaemonfile.c:
              * client/gdaemonvfs.[ch]:
              * client/gvfsdaemondbus.c:
      	Use private dbus connection even for async calls, since the
      	mainloop integration is conflicting with dbus-glib.
      	This is a temporary measure until this is solved in a better way.
      	
              * client/gdaemonvolumemonitor.c:
              * client/gvfsfusedaemon.c:
              * daemon/gvfsbackendsmbbrowse.c:
      	Update to the API changes
      
      
      svn path=/trunk/; revision=959
      1cd0ca1e
  27. 13 Sep, 2007 3 commits