]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
iomap: Add done_before argument to iomap_dio_rw
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 14 Apr 2022 22:28:50 +0000 (06:28 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 22 Jun 2022 12:22:32 +0000 (14:22 +0200)
commitaf0480c31efd0792f0ebb86a762fe8cc140226b9
tree1e25d654a5284c702eb892327538984eba5d45d1
parent7b7c16cea5196944a4a7790c51c589acd59a52ad
iomap: Add done_before argument to iomap_dio_rw

BugLink: https://bugs.launchpad.net/bugs/1976135
commit 4fdccaa0d184c202f98d73b24e3ec8eeee88ab8d upstream

Add a done_before argument to iomap_dio_rw that indicates how much of
the request has already been transferred.  When the request succeeds, we
report that done_before additional bytes were tranferred.  This is
useful for finishing a request asynchronously when part of the request
has already been completed synchronously.

We'll use that to allow iomap_dio_rw to be used with page faults
disabled: when a page fault occurs while submitting a request, we
synchronously complete the part of the request that has already been
submitted.  The caller can then take care of the page fault and call
iomap_dio_rw again for the rest of the request, passing in the number of
bytes already tranferred.

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/btrfs/file.c
fs/erofs/data.c
fs/ext4/file.c
fs/gfs2/file.c
fs/iomap/direct-io.c
fs/xfs/xfs_file.c
fs/zonefs/super.c
include/linux/iomap.h