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

change ksocklnd over to use iov_iter_for_each_range()

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • 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.

      Attachments

        Issue Links

          Activity

            People

              wc-triage WC Triage
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: