trackerd uses O_NOATIME, but fruitlessly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GLib |
Fix Released
|
Wishlist
|
|||
glib2.0 (Ubuntu) |
Fix Released
|
Wishlist
|
Ubuntu Desktop Bugs | ||
tracker (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: tracker
$ lsb_release -rd
Description: Ubuntu 8.04.1
Release: 8.04
$ apt-cache policy tracker | head -2
tracker:
Installed: 0.6.6-0ubuntu3.
trackerd intends to use the O_NOATIME flag when opening files to index, in order to preserve file timestamps (see http://
Steps to reproduce:
* start a graphical login session with trackerd enabled; trackerd should be started automatically in the default gnome session
* strace -ff -e open `pidof trackerd` 2>&1 | grep test-file-name
* (in another terminal) cd Desktop
* echo test-file-contents > test-file-name
* Inspect the sequence of open() syscalls issued by trackerd
Expected behavior: each open() of test-file-name includes the 'O_NOATIME' flag
Actual behavior: at least one open() lacks the 'O_NOATIME' flag
Partial strace output:
[pid 13383] stat("/
[pid 13383] open("/
[pid 13383] open("/
This caused a difficult-
Changed in glib: | |
status: | Unknown → Fix Released |
Changed in glib: | |
importance: | Unknown → Wishlist |
The test strace command I gave in the original report was incorrect. It should be:
strace -ff -e open -p `pidof trackerd` 2>&1 | grep test-file-name
(original lacked "-p")
xdgmime used fopen to get bytes to determine the file's mime type. this patch changes it to use open() so that the O_NOATIME flag can be given.