[Tracker] GMounts with no GVolume...



So imagine the following situation...

1) I've got a partition listed in fstab to be mounted in /data.
2) I've added /data to be indexed by tracker
3) Tracker properly indexes contents in /data, adding inotify monitors
4) As root, I unmount /data
5) tracker-miner-fs gets an unmount action in tracker-storage, but says
the location is not tracked (/data was never detected as a volume)
6) I mount /data in some other place not indexed by tracker
(/tmp/whatever) and I add new files in the partition.
7) I unmount /data from /tmp/whatever and mount it again in /data
8) tracker-miner-fs gets the mount action in tracker-storage, but
doesn't process it as removable media because no GVolume is obtained
from the GMount (unix mounts in fstab don't get a GVolume)

So, after last step, the new files are not indexed by tracker, as the
changes in the partition where done out of inotify control.

My first approach was to force a re-check of all locations to be
indexed, as if the configuration had changed. See:
http://git.gnome.org/browse/tracker/commit/?h=mounts-without-volumes&id=7ad039913988dcf8a9de4aa232583b9091d97525

I don't quite like this approach, although it seems to work, because
between steps 4 and 8, tracker will think that the resources in /data
are still available, even if they are not. Also, tracker-miner-fs will
still have inotify watches in the directories which are no longer
available after the partition was unmounted... A better approach would
be to have the fstab partitions also listed as volumes with
tracker-storage in tracker-miner-fs (thus, unmarking tracker:available
for those resources when partition is unmounted), but currently this is
not possible because of the lack of GVolume objects for those
partitions, and the lack of UUID for them.

In addition to this, there seems to be a problem with that first
approach, which is that if the steps are repeated but instead of adding
files from the partition, files are removed, when tracker-miner-fs
re-checks the partition after being mounted in the proper indexed
location, the removed files will still appear in the search results.
This is more or less equivalent to an already reported issue in gnome
bugzilla:
https://bugzilla.gnome.org/show_bug.cgi?id=620486


Any comments/suggestions? Should we try to make the partitions in fstab
also 'volumes' that can be unmounted/mounted?

-- 
Aleksander




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]