For file systems with a block size that equals the page size we never do
partial reads, so we can use the buffer_head-less iomap versions of
readpage and readpages without conflicting with the buffer_head structures
create later in write_begin.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
struct page *page)
{
trace_xfs_vm_readpage(page->mapping->host, 1);
+ if (i_blocksize(page->mapping->host) == PAGE_SIZE)
+ return iomap_readpage(page, &xfs_iomap_ops);
return mpage_readpage(page, xfs_get_blocks);
}
unsigned nr_pages)
{
trace_xfs_vm_readpages(mapping->host, nr_pages);
+ if (i_blocksize(mapping->host) == PAGE_SIZE)
+ return iomap_readpages(mapping, pages, nr_pages, &xfs_iomap_ops);
return mpage_readpages(mapping, pages, nr_pages, xfs_get_blocks);
}