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

mmap read of writable mapping updates mtime

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      Generating a read fault (ie, reading) from a memory mapped file mapped with PROT_WRITE updates mtime.  This is incorrect (compare with behavior of other POSIX file systems).

      This seems to be related to how we handle the difference between a writable mapping and a mkwrite operation - There is an oddity where ll_fault_io_init is called and sets ft_writable by directly checking the vm_flags, but mkwrite also sets ft_writable directly.

      This is definitely strange and should be cleaned up, but it's not clear to me if it's the issue - a read of a writable mapping doesn't cause a mkwrite, it's still just a page fault.

      But it could be we're not handling this correctly - this is unclear to me.

      In any case, the specific bug is that reading a writable mmap updates mtime, which it should not.

      Attachments

        Activity

          People

            paf0186 Patrick Farrell
            paf0186 Patrick Farrell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: