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

fiemap FIEMAP_FLAG_SYNC flag expects filemap_write_and_wait() or similar

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.16.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      fiemap FIEMAP_FLAG_SYNC can race while client is writing data to disk

      In such a case fiemap() call returns that the data is not on disk (no data for the range) and cp can just truncates (or sparse fill) based on the size of the file/extent.

      strace shows that FIEMAP_FLAG_SYNC was sent. Further and the user reports that a 'sync; cp <blah>' does not fail and a newer cp that uses copy_file_range() also does not fail.

      Looking further FIEMAP_FLAG_SYNC expects the data to be on disk aka filemap_write_and_wait() not just filemap_fdatawrite()

      Attachments

        1. SHOT02_09010.exr.trace.bad
          13 kB
          Lukasz Flis
        2. SHOT02_09010.exr.trace.good
          13 kB
          Lukasz Flis

        Issue Links

          Activity

            People

              stancheff Shaun Tancheff
              stancheff Shaun Tancheff
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: