Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-109431

[cifs] file mtime and ctime are no longer updated at file close time

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Yes
    • Low
    • rhel-fs-net
    • 5
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None
    • Merge Request passes all submitter checks, Merge Request finished CI testing, Merge Request passed CI testing, Merge Request approved by peer review

      What were you trying to do that didn't work?

      A change between the 8.8 kernel and 8.10 stopped file mtime and ctime from being updated at file close time.

       

      What is the impact of this issue to you?

      File mtime and ctime no longer indicate that the file was updated.

       

      Please provide the package NVR for which the bug is seen:

       

      kernel-4.18.0-553.53.1.el8_10.x86_64

       

      How reproducible is this bug?:

      easy

      Steps to reproduce

      1. open file
      2. sleep
      3. write to file
      4. sleep
      5. close file
      TESTFILE=/mnt/testfile
      exec 3>$TESTFILE
      stat $TESTFILE
      sleep 5
      date >&3
      stat $TESTFILE
      sleep 10
      date >&3
      stat $TESTFILE
      sleep 5
      exec 3>&-
      stat $TESTFILE

       

      Expected results

       

      mtime and ctime are 20 seconds later than time of file creation

       

      Actual results

      comparison with RHEL 8.8 and RHEL 9.6:

      RHEL 8.8  - mtime/ctime updated to close time
      RHEL 8.10 - mtime/ctime not updated at close
      RHEL 9.6  - mtime/ctime updated to close time

       

      RHEL 8.8 -                             | RHEL 8.10 -                   | RHEL 9.6 -
          4.18.0-477.103.1.el8_8             |     4.18.0-553.53.1.el8_10    |     5.14.0-570.19.1.el9_6
      # open/create file as fd 3
      exec 3> $TESTFILE
      stat $TESTFILE
      
       Access: 2025-08-04 09:53:15.619196100 | 2025-08-04 10:04:41.570496700 | 2025-08-04 10:13:58.271767300
       Modify: 2025-08-04 09:53:15.619196100 | 2025-08-04 10:04:41.570496700 | 2025-08-04 10:13:58.271767300
       Change: 2025-08-04 09:53:15.619196100 | 2025-08-04 10:04:41.570496700 | 2025-08-04 10:13:58.271767300
        Birth: 2025-08-04 09:53:15.564112200 | 2025-08-04 10:04:41.520026900 | 2025-08-04 10:13:58.144449300
      
      sleep 5
      
      # write to open file
      date >&3
      stat $TESTFILE
      
       Access: 2025-08-04 09:53:15.619196100 | 2025-08-04 10:04:41.570496700 | 2025-08-04 10:13:58.271767300
       Modify: 2025-08-04 09:53:15.619196100 | 2025-08-04 10:04:41.570496700 | 2025-08-04 10:13:58.271767300
       Change: 2025-08-04 09:53:15.619196100 | 2025-08-04 10:04:41.570496700 | 2025-08-04 10:13:58.271767300
        Birth: 2025-08-04 09:53:15.564112200 | 2025-08-04 10:04:41.520026900 | 2025-08-04 10:13:58.144449300
      
      sleep 10
      
      # write to open file
      date >&3
      stat $TESTFILE
      
       Access: 2025-08-04 09:53:15.619196100 | 2025-08-04 10:04:41.570496700 | 2025-08-04 10:13:58.271767300
       Modify: 2025-08-04 09:53:15.619196100 | 2025-08-04 10:04:41.570496700 | 2025-08-04 10:13:58.271767300
       Change: 2025-08-04 09:53:15.619196100 | 2025-08-04 10:04:41.570496700 | 2025-08-04 10:13:58.271767300
        Birth: 2025-08-04 09:53:15.564112200 | 2025-08-04 10:04:41.520026900 | 2025-08-04 10:13:58.144449300
      
      sleep 5
      
      # close file
      exec 3>&-
      stat $TESTFILE
      
       Access: 2025-08-04 09:53:15.564112200 | 2025-08-04 10:04:41.520026900 | 2025-08-04 10:13:58.271767300
       Modify: 2025-08-04 09:53:35.722790100 | 2025-08-04 10:04:41.570496700 | 2025-08-04 10:14:18.336002000
       Change: 2025-08-04 09:53:35.722790100 | 2025-08-04 10:04:41.570496700 | 2025-08-04 10:14:18.336002000
        Birth: 2025-08-04 09:53:15.564112200 | 2025-08-04 10:04:41.520026900 | 2025-08-04 10:13:58.144449300
      

       

              paalcant@redhat.com Paulo Alcantara
              rhn-support-fsorenso Frank Sorenson
              CIFS Team CIFS Team
              Xiaoli Feng Xiaoli Feng
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: