OSDN Git Service

iomap: Support partial direct I/O on user copy failures
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 22 Jul 2021 23:59:41 +0000 (01:59 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Sun, 24 Oct 2021 13:26:05 +0000 (15:26 +0200)
commit97308f8b0d867e9ef59528cd97f0db55ffdf5651
treeddf419571b6bf50ea98c445d822627b24a5fbb0b
parent42c498c18a94eed79896c50871889af52fa0822e
iomap: Support partial direct I/O on user copy failures

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>
fs/iomap/direct-io.c
include/linux/iomap.h