diff options
author | David Howells <dhowells@redhat.com> | 2023-05-22 14:49:56 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-05-24 08:42:16 -0600 |
commit | bd194b187115da7b98b660b049315f6c9c8267d1 (patch) | |
tree | 46d116fc343d8c68d3af3032efb0701fdd9368c3 /fs/overlayfs/file.c | |
parent | b85930a07738a95047a51dc5bc06b18fd91a9799 (diff) | |
download | linux-bd194b187115da7b98b660b049315f6c9c8267d1.tar.gz linux-bd194b187115da7b98b660b049315f6c9c8267d1.tar.bz2 linux-bd194b187115da7b98b660b049315f6c9c8267d1.zip |
shmem: Implement splice-read
The new filemap_splice_read() has an implicit expectation via
filemap_get_pages() that ->read_folio() exists if ->readahead() doesn't
fully populate the pagecache of the file it is reading from[1], potentially
leading to a jump to NULL if this doesn't exist. shmem, however, (and by
extension, tmpfs, ramfs and rootfs), doesn't have ->read_folio(),
Work around this by equipping shmem with its own splice-read
implementation, based on filemap_splice_read(), but able to paste in
zero_page when there's a page missing.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Daniel Golle <daniel@makrotopia.org>
cc: Guenter Roeck <groeck7@gmail.com>
cc: Christoph Hellwig <hch@lst.de>
cc: Jens Axboe <axboe@kernel.dk>
cc: Al Viro <viro@zeniv.linux.org.uk>
cc: John Hubbard <jhubbard@nvidia.com>
cc: David Hildenbrand <david@redhat.com>
cc: Matthew Wilcox <willy@infradead.org>
cc: Hugh Dickins <hughd@google.com>
cc: linux-block@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
Link: https://lore.kernel.org/r/Y+pdHFFTk1TTEBsO@makrotopia.org/ [1]
Link: https://lore.kernel.org/r/20230522135018.2742245-10-dhowells@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/overlayfs/file.c')
0 files changed, 0 insertions, 0 deletions