[Tracker] trackerd modifies the access time of files it indexes
- From: Jeff Epler <jepler unpythonic net>
- To: tracker-list gnome org
- Subject: [Tracker] trackerd modifies the access time of files it indexes
- Date: Tue, 30 Dec 2008 09:44:10 -0600
As you probably know, Linux since 2.6.8 supports the O_NOATIME flag
specifically to allow indexing programs to avoid changing the access
time of the files it indexes.
In the 0.6.3 timeframe, the O_NOATIME flag was added in multiple places
to attempt to avoid changing the access time of files merely because
they were accessed:
============= (25 Sep 2007)
* Many more optimisations - transactions, use of O_NOATIME and
I'm not sure whether this ever worked, but I discovered that in 0.6.6
on Ubuntu 8.04, trackerd was changing the atime of my ~/mail/* mbox
files, preventing mutt from seeing new mail. I filed a bug on launchpad
only, not yet on gnome; I also produced a patch against the hardy
package that seems to fix the problem for me:
Before filing a bug on gnome, I looked at the present svn trunk. I see
that xdgmime has been replaced by gio. I have not yet tried the svn
version, but I suspect the bug still exists but isn't so easy to fix as
the relevant open() is taking place inside libgio instead of in a
library bundled as source with tracker, and in a standalone program it
could easily be seen that the open() call within g_file_query_info does
not specify O_NOATIME.
Are you interested in preventing access time modification for indexed
files? If so, how can I help? Should I file bugs on gnome bugzilla?
If so, against 0.6.6 or against trunk?
It seem that gio/glocalfileinfo.c:get_content_type() could be
modified to use O_NOATIME when it is available, either unconditionally
or through a new GFileQueryInfoFlags bit; or
G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE could be used in the call to
g_file_query_info() in tracker-file-utils.c to avoid the open(); or in
some other way I haven't anticipated.
] [Thread Prev