[LU-12382] Deadloop on tiny write Created: 04/Jun/19  Updated: 09/Oct/19  Resolved: 25/Jun/19

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.13.0, Lustre 2.12.3

Type: Bug Priority: Minor
Reporter: Wang Shilong (Inactive) Assignee: Wang Shilong (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-12721 HPE MPT MPI and lustre2.12 clients ca... Resolved
Severity: 3
Rank (Obsolete): 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.



 Comments   
Comment by Gerrit Updater [ 04/Jun/19 ]

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

Comment by Gerrit Updater [ 25/Jun/19 ]

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

Comment by Peter Jones [ 25/Jun/19 ]

Landed for 2.13

Comment by Gerrit Updater [ 25/Jun/19 ]

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

Comment by Gerrit Updater [ 03/Jul/19 ]

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

Comment by Gerrit Updater [ 09/Oct/19 ]

deleted wrong pushing

Generated at Sat Feb 10 02:52:06 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.