Skip to contentSkip to conversation

avoiding atime invalidation with mount -o noatime (instead of just -o ro)

fuse-devel Miklos Szeredi 1 participant 1 message Jan 17, 2020 1 message not in the archive VFS

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 10 lines · Robert Byrnes

The fuse module invalidates the atime after any operation (like readlink) that might change it, using this function (in fs/fuse/dir.c) ...

/**
* Mark the attributes as stale due to an atime change. Avoid the
invalidate if
* atime is not used.
*/
void fuse_invalidate_atime(struct inode *inode)

Quoted 6 lines
{
        if (!IS_RDONLY(inode))
                WRITE_ONCE(get_fuse_inode(inode)->inval_atime, 1);
}

Shouldn't that be IS_NOATIME instead of IS_RDONLY?

It would work if we also added an INIT flag (e.g. FUSE_NOATIME) which would set SB_NOATIME on the fuse superblock.

The current per-mount "noatime" option doesn't work exactly because it's per-mount and we cannot determine if all mounts of a given superblock have this flag set.

Thanks,
Miklos