]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
iomap: Support partial direct I/O on user copy failures
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 14 Apr 2022 22:28:49 +0000 (06:28 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 22 Jun 2022 12:22:32 +0000 (14:22 +0200)
commit7b7c16cea5196944a4a7790c51c589acd59a52ad
tree31f75c8598e7c43e9c0656dd08ea45cefb78d520
parent657f62374b60edaf2292cb8a542bd02531e8e878
iomap: Support partial direct I/O on user copy failures

BugLink: https://bugs.launchpad.net/bugs/1976135
commit 97308f8b0d867e9ef59528cd97f0db55ffdf5651 upstream

In iomap_dio_rw, when iomap_apply returns an -EFAULT error and the
IOMAP_DIO_PARTIAL flag is set, complete the request synchronously and
return a partial result.  This allows the caller to deal with the page
fault and retry the remainder of the request.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/iomap/direct-io.c
include/linux/iomap.h