Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-379

POSIX: read.13 and readdir.6: time stamps incorrect: atime was not updated

Details

    • 3
    • 23,291
    • 8310

    Description

      Here is the result of running the LSB-VSX POSIX test suite (lts_vsx-pcts2.0beta2.tgz):
      https://maloo.whamcloud.com/test_sets/f610526e-8b52-11e0-aab9-52540025f9af

      The baseline is ext4.

      ####################################################
      Test Name: read.13 Failed
      
      	Test Description:
      The access time field st_atime is marked for update on a call to
      read().
      Posix Ref: Component READ Assertion 6.4.1.2-19(A)
      
      	Test Strategy:
      OPEN existing file containing 36 bytes of known data
      SAVE timestamps using savtimes() - (genlib)
      VERIFY read(fd, buf, 36) returns 36
      VERIFY that st_atime has been updated using chktimes() - (genlib)
      REPEAT for FIFO and pipe:
        WRITE 36 bytes to FIFO/pipe
        SAVE timestamps using savtimes()/fsavtimes() - (genlib)
        VERIFY read(fd, buf, 36) returns 36
        VERIFY that st_atime has been updated using chktimes()/fchktimes() -
        (genlib)
      
      	Test Information:
      time stamps incorrect: atime was not updated
      
      ####################################################
      Test Name: readdir.6 Failed
      
      	Test Description:
      A call to readdir() will mark for update the st_atime time-related
      field of the directory each time the directory is actually read.
      Posix Ref: Component READDIR Assertion 5.1.2.2-09(A)
      
      	Test Strategy:
      OBTAIN the system value associated with pathconf() with _PC_NAME_MAX
      and current directory
      VERIFY that pathconf() returned successfully and errno was not set
      IF the maximum number of characters in a file name (from pathconf())
      is greater than _POSIX_NAME_MAX then:
        CREATE an element in the entry table with a name which is of this
        length
      FOR all elements in the entry table except those for "." and ".."
        CREATE file using crfile() - (genlib)
        SAVE the inode for the file in the entry table
      SAVE times stamps using savtimes() - (genlib)
      OPEN current directory using opendir()
      READ directory using readdir()
      VERIFY that readdir() returned successfully
      VERIFY that st_atime has been updated using chktimes() - (genlib)
      CLOSE directory using closedir()
      UNLINK all elements in the entry table except those for "." and ".."
      using unlink()
      
      	Test Information:
      time stamps incorrect: atime was not updated
      
      

      Attachments

        Issue Links

          Activity

            [LU-379] POSIX: read.13 and readdir.6: time stamps incorrect: atime was not updated

            Old blocker for unsupported version

            simmonsja James A Simmons added a comment - Old blocker for unsupported version
            yujian Jian Yu added a comment -

            After removing readdir.6 and read.13 tests from the Lustre-specific scenario file myscen.exec for the LSB-VSX POSIX test suite, POSIX compliance testing passed on T.readdir and T.read test sets (baseline is ext4):

            Lustre branch: master
            Lustre build: http://build.whamcloud.com/job/lustre-master/766/
            https://maloo.whamcloud.com/test_sets/3df07240-e088-11e1-a388-52540035b04c

            yujian Jian Yu added a comment - After removing readdir.6 and read.13 tests from the Lustre-specific scenario file myscen.exec for the LSB-VSX POSIX test suite, POSIX compliance testing passed on T.readdir and T.read test sets (baseline is ext4): Lustre branch: master Lustre build: http://build.whamcloud.com/job/lustre-master/766/ https://maloo.whamcloud.com/test_sets/3df07240-e088-11e1-a388-52540035b04c

            To comment on this bug - the client should update the atime locally for every read() call. It normally only saves the atime on disk at the MDS at close time, and only if the atime is more than 60s newer than the atime on disk at the MDS. However, the POSIX test running on the client should not be able to detect this, since it should normally be getting the atime from the client cache.

            adilger Andreas Dilger added a comment - To comment on this bug - the client should update the atime locally for every read() call. It normally only saves the atime on disk at the MDS at close time, and only if the atime is more than 60s newer than the atime on disk at the MDS. However, the POSIX test running on the client should not be able to detect this, since it should normally be getting the atime from the client cache.
            yujian Jian Yu added a comment -

            So POSIX read.13 and readdir.6 are meaningless for Lustre.

            Then let's remove them from the Lustre-specific scenario file myscen.exec for the LSB-VSX POSIX test suite.

            yujian Jian Yu added a comment - So POSIX read.13 and readdir.6 are meaningless for Lustre. Then let's remove them from the Lustre-specific scenario file myscen.exec for the LSB-VSX POSIX test suite.

            Lustre is non-POSIX for atime update. Consider performance, Lustre does not update file atime for each read() against the file. There is a parameter on MDS, called "atime_diff", to be used to control the behavior of atime changing. Only when the new "atime" is larger than the old "atime" over "atime_diff", then the atime can be changed.

            So POSIX read.13 and readdir.6 are meaningless for Lustre.

            yong.fan nasf (Inactive) added a comment - Lustre is non-POSIX for atime update. Consider performance, Lustre does not update file atime for each read() against the file. There is a parameter on MDS, called "atime_diff", to be used to control the behavior of atime changing. Only when the new "atime" is larger than the old "atime" over "atime_diff", then the atime can be changed. So POSIX read.13 and readdir.6 are meaningless for Lustre.
            yujian Jian Yu added a comment -

            Lustre Tag: v2_0_65_0
            Lustre Build: http://newbuild.whamcloud.com/job/lustre-master/204/
            e2fsprogs Build: http://newbuild.whamcloud.com/job/e2fsprogs-master/42/
            Distro/Arch: RHEL5/x86_64(OFED 1.5.3.1, kernel version: 2.6.18-238.12.1.el5)

            POSIX compliance testing report: https://maloo.whamcloud.com/test_sets/e4ede34c-b13c-11e0-b33f-52540025f9af

            The baseline is ext4.

            yujian Jian Yu added a comment - Lustre Tag: v2_0_65_0 Lustre Build: http://newbuild.whamcloud.com/job/lustre-master/204/ e2fsprogs Build: http://newbuild.whamcloud.com/job/e2fsprogs-master/42/ Distro/Arch: RHEL5/x86_64(OFED 1.5.3.1, kernel version: 2.6.18-238.12.1.el5) POSIX compliance testing report: https://maloo.whamcloud.com/test_sets/e4ede34c-b13c-11e0-b33f-52540025f9af The baseline is ext4.
            yujian Jian Yu added a comment -

            Lustre Branch: v1_8_6_RC2
            Lustre Build: http://newbuild.whamcloud.com/job/lustre-b1_8/80/
            e2fsprogs Build: http://newbuild.whamcloud.com/job/e2fsprogs-master/40/
            Distro/Arch: RHEL5/x86_64(OFED 1.5.3.1, kernel version: 2.6.18-238.12.1.el5_lustre)

            POSIX compliance testing report: https://maloo.whamcloud.com/test_sets/2cd4d244-98d1-11e0-9a27-52540025f9af

            The baseline is ext4.

            yujian Jian Yu added a comment - Lustre Branch: v1_8_6_RC2 Lustre Build: http://newbuild.whamcloud.com/job/lustre-b1_8/80/ e2fsprogs Build: http://newbuild.whamcloud.com/job/e2fsprogs-master/40/ Distro/Arch: RHEL5/x86_64(OFED 1.5.3.1, kernel version: 2.6.18-238.12.1.el5_lustre) POSIX compliance testing report: https://maloo.whamcloud.com/test_sets/2cd4d244-98d1-11e0-9a27-52540025f9af The baseline is ext4.

            People

              malkolm Malcolm Cowe (Inactive)
              yujian Jian Yu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: