[issue2056] HAMMER does not update file access time after read

Alex Hornung (via DragonFly issue tracker) sinknull at leaf.dragonflybsd.org
Fri Jul 8 04:11:42 PDT 2011


Alex Hornung <ahornung at gmail.com> added the comment:

The code is in hammer_vop_read:

        /*
         * XXX only update the atime if we had to get the MP lock.
         * XXX hack hack hack, fixme.
         */
        if (got_fstoken) {
                if ((ip->flags & HAMMER_INODE_RO) == 0 &&
                    (ip->hmp->mp->mnt_flag & MNT_NOATIME) == 0) {
                        ip->ino_data.atime = trans.time;
                        hammer_modify_inode(&trans, ip, HAMMER_INODE_ATIME);
                }
                hammer_done_transaction(&trans);
                lwkt_reltoken(&hmp->fs_token);
        }
        return (error);


It seems that the atime is only updated sometimes. This is horribly inconsistent
behaviour. Matt needs to look at this one, too. I've not the slightest clue why
such a hackish behaviour.

Regards,
Alex

_____________________________________________________
DragonFly issue tracker <bugs at lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue2056>
_____________________________________________________






More information about the Bugs mailing list