]> git.ipfire.org Git - people/ms/linux.git/commit - fs/iomap/direct-io.c
iomap: support reading inline data from non-zero pos
authorGao Xiang <hsiangkao@linux.alibaba.com>
Tue, 3 Aug 2021 16:38:22 +0000 (09:38 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 3 Aug 2021 16:43:13 +0000 (09:43 -0700)
commit69f4a26c1e0c7c5e5e77c5bd7b271743c124c545
tree4e944b086cefaeb1145a09dad8c16a72fdff2619
parentc1b79f11f4ec27d3b3197a9584950a3be178c717
iomap: support reading inline data from non-zero pos

The existing inline data support only works for cases where the entire
file is stored as inline data.  For larger files, EROFS stores the
initial blocks separately and the remainder of the file ("file tail")
adjacent to the inode.  Generalise inline data to allow reading the
inline file tail.  Tails may not cross a page boundary in memory.

We currently have no filesystems that support tails and writing,
so that case is currently disabled (see iomap_write_begin_inline).

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/iomap/buffered-io.c
fs/iomap/direct-io.c
include/linux/iomap.h