// SPDX-License-Identifier: GPL-2.0-or-later /* Direct I/O support. * * Copyright (C) 2023 Red Hat, Inc. All Rights Reserved. * Written by David Howells ([email protected]) */ #include <linux/export.h> #include <linux/fs.h> #include <linux/mm.h> #include <linux/pagemap.h> #include <linux/slab.h> #include <linux/uio.h> #include <linux/sched/mm.h> #include <linux/task_io_accounting_ops.h> #include <linux/netfs.h> #include "internal.h" /** * netfs_unbuffered_read_iter_locked - Perform an unbuffered or direct I/O read * @iocb: The I/O control descriptor describing the read * @iter: The output buffer (also specifies read length) * * Perform an unbuffered I/O or direct I/O from the file in @iocb to the * output buffer. No use is made of the pagecache. * * The caller must hold any appropriate locks. */ ssize_t netfs_unbuffered_read_iter_locked(struct kiocb *iocb, struct iov_iter *iter) { … } EXPORT_SYMBOL(…); /** * netfs_unbuffered_read_iter - Perform an unbuffered or direct I/O read * @iocb: The I/O control descriptor describing the read * @iter: The output buffer (also specifies read length) * * Perform an unbuffered I/O or direct I/O from the file in @iocb to the * output buffer. No use is made of the pagecache. */ ssize_t netfs_unbuffered_read_iter(struct kiocb *iocb, struct iov_iter *iter) { … } EXPORT_SYMBOL(…);