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



On Tue, Dec 30, 2008 at 11:48 AM, A. Walton <awalton gmail com> wrote:
On Tue, Dec 30, 2008 at 11:39 AM, Martyn Russell <martyn imendio com> wrote:
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.
    (tracker-svn/trunk/NEWS)

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:
    https://bugs.launchpad.net/ubuntu/+source/tracker/+bug/312365

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.

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.


Patch is attached for GIO, hopefully will fix this. Will upload to
Bugzilla whenever it actually starts responding here.


Replying to myself, and for the convenience of the list, here's the bug:
http://bugzilla.gnome.org/show_bug.cgi?id=566064

-A. Walton

--
Regards,
Martyn
_______________________________________________
tracker-list mailing list
tracker-list gnome org
http://mail.gnome.org/mailman/listinfo/tracker-list





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