OSDN Git Service

iomap: use a srcmap for a read-modify-write I/O
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Fri, 18 Oct 2019 23:44:10 +0000 (16:44 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 21 Oct 2019 15:51:59 +0000 (08:51 -0700)
commitc039b99792726346ad46ff17c5a5bcb77a5edac4
treee9034adc21c6fc3ad6fc775e8f3225e35b015d50
parenteb81cf9d0e18d438e27339e0d1a49d3ac8644674
iomap: use a srcmap for a read-modify-write I/O

The srcmap is used to identify where the read is to be performed from.
It is passed to ->iomap_begin, which can fill it in if we need to read
data for partially written blocks from a different location than the
write target.  The srcmap is only supported for buffered writes so far.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
[hch: merged two patches, removed the IOMAP_F_COW flag, use iomap as
      srcmap if not set, adjust length down to srcmap end as well]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Acked-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
12 files changed:
fs/dax.c
fs/ext2/inode.c
fs/ext4/inode.c
fs/gfs2/bmap.c
fs/iomap/apply.c
fs/iomap/buffered-io.c
fs/iomap/direct-io.c
fs/iomap/fiemap.c
fs/iomap/seek.c
fs/iomap/swapfile.c
fs/xfs/xfs_iomap.c
include/linux/iomap.h