]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4c6ab6287b2eaa06170490cc77f4064eab0e6d5f
tree4e944b086cefaeb1145a09dad8c16a72fdff2619
parent878062d10027d8c80b7359db86b4c3df32ab78b3
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