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

            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 added a comment -

            Landed for 2.13

            pjones Peter Jones added a comment - Landed for 2.13

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

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

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

            gerrit Gerrit Updater added a comment - Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/35058 Subject: LU-12382 llite: fix deadloop with tiny write Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: a37fa1e33d85efa7cb384249a2280860ed123618

            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: