[LU-14633] change ksocklnd over to use iov_iter_for_each_range() Created: 22/Apr/21  Updated: 22/Apr/21

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Andreas Dilger Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: upstream

Issue Links:
Related
is related to LU-12511 Prepare lustre for adoption into the ... Open
is related to LU-12678 LNet simplification work from linux c... Open
Rank (Obsolete): 9223372036854775807

 Description   

It came up in a discussion today on IRC that Lustre-staging was using iov_iter_for_each_range(), which Al Viro apparently added specifically for use by ksocknal_lib_recv() to clean up the code there.

This was done in upstream kernel commits:

  • v4.14-rc4-19-g6d1ff4d6f37d "lnet_return_rx_credits_locked: don't abuse list_entry"
  • v4.14-rc4-20-g09cf698a5942 "new primitive: iov_iter_for_each_range()"
  • v4.14-rc4-23-g33ec9c5cae25 "lustre: switch struct ksock_conn to iov_iter"
  • v4.14-rc4-24-g8ececffa12f5 "switch ksocknal_lib_recv_...() to use of iov_iter_for_each_range()"

It isn't clear why these changes weren't part of the patches being merged into master, but they look like a reasonable cleanup (remove a few hundred lines of code in total).

Since the iov_iter_for_each_range() is only available starting in 4.14 (it isn't in RHEL7.x), (and may be on the verge of being removed upstream, based on the IRC discussion) it makes sense to have a configure check and compat version of iov_iter_for_each_range() for kernels that do not provide it, and we can reintroduce it (if needed) when Lustre is pushed upstream.



 Comments   
Comment by Andreas Dilger [ 22/Apr/21 ]

James, Neil, I came across a few patches that Al Viro did to ksocklnd upstream that are missing from master that may be worthwhile to merge, so Al doesn't become unhappy about the regression on the future submission.

Comment by James A Simmons [ 22/Apr/21 ]

The reason I haven't push this work is due to the iov changes for this lacking in RHLE7. Its going to take some work to make that to happen.

Generated at Sat Feb 10 03:11:26 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.