OpenSSI fails the glibc tst-atime test
Brought to you by:
brucewalker,
rogertsang
CFS doesn't keep the atime (last accessed time) field up to date.
This is a known limitation, I'm just reporting it here so it doesn't get forgotten about.
Maybe as a workaround we could pretend that cfs filesystems were mounted with the noatime option?
To reproduce:
$ cc tst-atime.c
$ ./a.out
atime has not changed
Simple idea, just do this at user level by remounting the fs with an explicit noatime option:
mount -o remount,noatime /
doesn't work because statvfs reads /proc/mounts to find the mount options and some of the weird crud we have hanging around confuses it:
# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev2/root2 / cfs rw,noatime,chard,node=1 0 0
...
Which is the real root? Apparently statvfs thinks it's the first one.
Actually the:
rootfs / rootfs
stuff is not specific to OpenSSI.
What happens in statvfs is it looks for a mountpoint with the same filesystem type as the file it's been given (so it's looking for ext2/ext3) but from /proc our fs shows up as cfs, so it doesn't see that it's the same one.
Later on it retries without the type, but this time around the "rootfs / rootfs" one matches and that doesn't have the flags.
What's very bizarre is that this sometimes works on nodes other than the one where the underlying filesystem is mounted, the access time seems to get changed the first time a file is read, but not afterwards.
Testing a patch. So far successfully tested at server.
Tracker.. Huh, really? :)