iomap: Add done_before argument to iomap_dio_rw
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>
Showing
- fs/btrfs/file.c 3 additions, 2 deletionsfs/btrfs/file.c
- fs/erofs/data.c 1 addition, 1 deletionfs/erofs/data.c
- fs/ext4/file.c 3 additions, 2 deletionsfs/ext4/file.c
- fs/gfs2/file.c 2 additions, 2 deletionsfs/gfs2/file.c
- fs/iomap/direct-io.c 16 additions, 3 deletionsfs/iomap/direct-io.c
- fs/xfs/xfs_file.c 3 additions, 3 deletionsfs/xfs/xfs_file.c
- fs/zonefs/super.c 2 additions, 2 deletionsfs/zonefs/super.c
- include/linux/iomap.h 2 additions, 2 deletionsinclude/linux/iomap.h
Please register or sign in to comment