Details

    • 3
    • 9223372036854775807

    Description

      For a small write(<4K), we will use tiny write and __generic_file_write_iter() will be called to handle it. On newer kernel(4.14 etc), the function is exported and will do something like following:

          |->__generic_file_write_iter
            |->generic_write_perform()
      
       

      If iov_iter_count() passed in is 0, generic_write_perform() will try go to forever loop as bytes copied is always calculated as 0.

      The problem is VFS doesn't always skip IO count zero before it comes to lower layer read/write hook, and we should do it by ourselves.

      Attachments

        Issue Links

          Activity

            [LU-12382] Deadloop on tiny write
            gerrit Gerrit Updater added a comment - - edited

            deleted wrong pushing

            gerrit Gerrit Updater added a comment - - edited deleted wrong pushing
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-12721 [ LU-12721 ]
            pjones Peter Jones made changes -
            Labels Original: LTS12
            pjones Peter Jones made changes -
            Link Original: This issue is related to JFC-17 [ JFC-17 ]
            pjones Peter Jones made changes -
            Link New: This issue is related to JFC-20 [ JFC-20 ]
            pjones Peter Jones made changes -
            Fix Version/s New: Lustre 2.12.3 [ 14418 ]

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35312/
            Subject: LU-12382 llite: fix deadloop with tiny write
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set:
            Commit: 31f3bfb87ef02dd6c7f56f897a293406e846c4d9

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35312/ Subject: LU-12382 llite: fix deadloop with tiny write Project: fs/lustre-release Branch: b2_12 Current Patch Set: Commit: 31f3bfb87ef02dd6c7f56f897a293406e846c4d9

            Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/35312
            Subject: LU-12382 llite: fix deadloop with tiny write
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set: 1
            Commit: e8170b6bcadd67a676449b23f64764a546ff04b2

            gerrit Gerrit Updater added a comment - Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/35312 Subject: LU-12382 llite: fix deadloop with tiny write Project: fs/lustre-release Branch: b2_12 Current Patch Set: 1 Commit: e8170b6bcadd67a676449b23f64764a546ff04b2
            pjones Peter Jones made changes -
            Labels New: LTS12
            pjones Peter Jones made changes -
            Link Original: This issue is related to JFC-19 [ JFC-19 ]

            People

              wshilong Wang Shilong (Inactive)
              wshilong Wang Shilong (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: