Re: [Tracker] trackerd modifies the access time of files it indexes

On 30/12/08 15:44, Jeff Epler wrote:
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:

     Tracker 0.6.3
     ============= (25 Sep 2007)
       * Many more optimisations - transactions, use of O_NOATIME and
         posix_fadvise everywhere.

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_query_info() in tracker-file-utils.c to avoid the open(); or in
some other way I haven't anticipated.

Ivan is spot on! We used to use O_NOATIME, I recall it being in the code, but now we use GIO, we don't specify that. I suspect GIO needs fixing here.


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