Whamcloud - gitweb
LU-17085 llite: safely duplicate iov_iter 66/52266/25
authorShaun Tancheff <shaun.tancheff@hpe.com>
Tue, 4 Jun 2024 23:18:34 +0000 (06:18 +0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Jun 2024 03:25:04 +0000 (03:25 +0000)
commitd144cd055b48027b3d045c2566f4b180327a1a13
tree948a1acadd5357a99b981673823713cb1693b0f5
parentad30edf91065d733d7da68de755acf1043429101
LU-17085 llite: safely duplicate iov_iter

When copying an iov_iter the underlying iovec/bvec also
needs to be duplicated.
Discard and xarray iters are not relevant here however the
memory allocated needs to be tracked and freed.

This borrows heavily from dup_iter()

The iter argument to ll_dio_user_copy() is no longer used
and can be removed.

Explicitly handle ubuf() cases to work with el9.4 back-port
of ITER_UBUF series.

Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I9f68eaa14abc8915d543dba91eea598edbd9872d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52266
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
Reviewed-by: xinliang <xinliang.liu@linaro.org>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/autoconf/lustre-core.m4
lustre/include/cl_object.h
lustre/llite/rw26.c
lustre/obdclass/cl_io.c