RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 915844 - mount man page incorrectly describes behaviour of "relatime" mount option
Summary: mount man page incorrectly describes behaviour of "relatime" mount option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: util-linux-ng
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Karel Zak
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-26 15:52 UTC by Andrew Beresford
Modified: 2013-11-21 20:45 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The mount man page incorrectly describes "relatime" mount option. Consequence: Fix: The description of the "relatime" mount option in the mount man page has been improved to better describe when kernel updates atime. Result:
Clone Of:
Environment:
Last Closed: 2013-11-21 20:45:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1648 0 normal SHIPPED_LIVE util-linux-ng bug fix and enhancement update 2013-11-20 21:53:24 UTC

Description Andrew Beresford 2013-02-26 15:52:03 UTC
Description of problem:

The man page for mount incorrectly describes the mount option relatime;

       relatime
              Update inode access times relative to modify or change time.  Access time is only updated if the previous access time was  ear-
              lier  than  the  current  modify or change time. (Similar to noatime, but doesn’t break mutt or other applications that need to
              know if a file has been read since the last time it was modified.)

However, this is incorrect. The code in the kernel will update the atime if it is more than 24 hours later than mtime;

/*
 * With relative atime, only update atime if the previous atime is
 * earlier than either the ctime or mtime or if at least a day has
 * passed since the last atime update.
 */
static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
                             struct timespec now)
{

        if (!(mnt->mnt_flags & MNT_RELATIME))
                return 1;
        /*
         * Is mtime younger than atime? If yes, update atime:
         */
        if (timespec_compare(&inode->i_mtime, &inode->i_atime) >= 0)
                return 1;
        /*
         * Is ctime younger than atime? If yes, update atime:
         */
        if (timespec_compare(&inode->i_ctime, &inode->i_atime) >= 0)
                return 1;

        /*
         * Is the previous atime value older than a day? If yes,
         * update atime:
         */
        if ((long)(now.tv_sec - inode->i_atime.tv_sec) >= 24*60*60)
                return 1;
        /*
         * Good, we can skip the atime update:
         */
        return 0;
}

It is worth mentioning that more recent versions of the man mount page state the correct behaviour.

       relatime
              Update inode access times relative to modify or change time.  Access time is only updated if the previous access time was earlier than  the
              current  modify or change time. (Similar to noatime, but doesn't break mutt or other applications that need to know if a file has been read
              since the last time it was modified.)

              Since Linux 2.6.30, the kernel defaults to the behavior provided by this option (unless noatime was  specified), and the strictatime option
              is  required  to  obtain traditional semantics. In addition, since Linux 2.6.30, the file's last access time is always  updated  if  it  is
              more than 1 day old.

(taken from util-linux 2.20.1)

Version-Release number of selected component (if applicable):

util-linux-ng-2.17.2-12.9.el6.x86_64

How reproducible:

Very :) 

Steps to Reproduce:
1. man mount
2. read entry for "relatime"
  
Actual results:

Incorrectly describes relatime option

Expected results:

Should correctly describe relatime option
Additional info:

Comment 2 RHEL Program Management 2013-03-02 06:47:27 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 errata-xmlrpc 2013-11-21 20:45:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1648.html


Note You need to log in before you can comment on or make changes to this bug.