After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 680340 - unable to monitor access time changes
unable to monitor access time changes
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 145255
 
 
Reported: 2012-07-20 20:32 UTC by William Jon McCann
Modified: 2018-05-24 14:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add ability to monitor access time changes (1.77 KB, patch)
2012-07-20 20:33 UTC, William Jon McCann
none Details | Review
Add ability to monitor access time changes (2.31 KB, patch)
2012-07-21 13:33 UTC, William Jon McCann
none Details | Review
Add ability to monitor access time changes (4.53 KB, patch)
2012-07-21 14:49 UTC, William Jon McCann
needs-work Details | Review
Add ability to monitor access time changes (4.44 KB, patch)
2012-07-21 16:14 UTC, William Jon McCann
none Details | Review

Description William Jon McCann 2012-07-20 20:32:19 UTC
Nautilus displays access time in various places in the interface. These values are often a lie because we don't get any information from GIO about changes.

The inotify code seems to explicitly ignore IN_ACCESS events.
Comment 1 William Jon McCann 2012-07-20 20:33:59 UTC
Created attachment 219347 [details] [review]
Add ability to monitor access time changes

Interpret them as attribute changes which seems
reasonable since access time is retrieved as an
attribute in the API.
Comment 2 Emmanuele Bassi (:ebassi) 2012-07-20 20:35:52 UTC
don't most filesystems get mounted with noatime anyway?
Comment 3 Cosimo Cecchi 2012-07-20 20:45:27 UTC
At least on Fedora the default is to use relatime.
Comment 4 Allison Karlitskaya (desrt) 2012-07-20 22:45:33 UTC
access time is a complete disaster... particularly considering it gets update when you do something as innocent as content-type identification...
Comment 5 William Jon McCann 2012-07-20 22:57:31 UTC
Can you give examples what what you mean? GIO already gets file_info using O_NOATIME.
Comment 6 Allison Karlitskaya (desrt) 2012-07-21 00:57:32 UTC
It seems that some thumbnailers do not, then.

Of course, we could try to patch all of those up as well...
Comment 7 William Jon McCann 2012-07-21 01:05:35 UTC
Yep. See bug 680326.
Comment 8 William Jon McCann 2012-07-21 13:33:32 UTC
Created attachment 219382 [details] [review]
Add ability to monitor access time changes

Changed to add a new event type that most apps probably won't
handle by default. Using a changed type event made it too
easy to get into cycles.
Comment 9 William Jon McCann 2012-07-21 14:49:54 UTC
Created attachment 219385 [details] [review]
Add ability to monitor access time changes

After more testing I don't think even that was enough. Too many
clients are interpreting the "changed" signal, unsurprisingly,
to mean the file was changed. It might be better to add a 
separate signal for accessed.
Comment 10 Allison Karlitskaya (desrt) 2012-07-21 14:54:40 UTC
Review of attachment 219385 [details] [review]:

::: gio/inotify/inotify-path.c
@@ +36,3 @@
 #include "inotify-missing.h"
 
+#define IP_INOTIFY_MASK (IN_ACCESS|IN_MODIFY|IN_ATTRIB|IN_MOVED_FROM|IN_MOVED_TO|IN_DELETE|IN_CREATE|IN_DELETE_SELF|IN_UNMOUNT|IN_MOVE_SELF|IN_CLOSE_WRITE)

I have a pretty big problem with this part of the patch.

We now turn every single case of file change monitoring into file access monitoring (in terms of effect on the kernel and number of process wakeups).

This would definitely need to be done on an opt-in basis...

I still question the usefulness of atime in general...
Comment 11 William Jon McCann 2012-07-21 16:14:14 UTC
Created attachment 219387 [details] [review]
Add ability to monitor access time changes

Small update. Need to put the new signal in the reserved area.
Comment 12 Dan Winship 2012-07-21 17:36:05 UTC
It would be better to add a flag to opt in to atime notifications. like bug 532815
Comment 13 Colin Walters 2012-07-26 09:34:26 UTC
Can't we just delete access time from the Nautilus user interface?
Comment 14 Bastien Nocera 2012-08-15 17:21:40 UTC
(In reply to comment #13)
> Can't we just delete access time from the Nautilus user interface?

atime is used for other things, see the related bugs.
Comment 15 GNOME Infrastructure Team 2018-05-24 14:22:47 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/576.