Tested some more locally and the above fix solves half the problem. The other half of the problem is that the gvfs trash daemon creates a .Trash directory inside mount points.
This problem can be worked around entirely using the following workaround:
sudo killall -STOP gvfs-gdu-volume-monitor gvfsd-trash
We use the above workaround in the Chrome OS build system to ensure that gvfs doesn't mess with our loop devices. There must be a better way...
Tested some more locally and the above fix solves half the problem. The other half of the problem is that the gvfs trash daemon creates a .Trash directory inside mount points.
This problem can be worked around entirely using the following workaround: volume- monitor gvfsd-trash
sudo killall -STOP gvfs-gdu-
We use the above workaround in the Chrome OS build system to ensure that gvfs doesn't mess with our loop devices. There must be a better way...