mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
9aa29a20b7
The direct IO code is over a thousand lines and it's currently spread between file.c and inode.c, which makes it not easy to locate some parts of it sometimes. Also inode.c is about 11 thousand lines and file.c about 4 thousand lines, both too big. So move all the direct IO code into a dedicated file, so that it's easy to locate all its code and reduce the sizes of inode.c and file.c. This is a pure move of code without any other changes except export a a couple functions from inode.c (get_extent_allocation_hint() and create_io_em()) because they are used in inode.c and the new direct-io.c file, and a couple functions from file.c (btrfs_buffered_write() and btrfs_write_check()) because they are used both in file.c and in the new direct-io.c file. Reviewed-by: Boris Burkov <boris@bur.io> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
15 lines
361 B
C
15 lines
361 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef BTRFS_DIRECT_IO_H
|
|
#define BTRFS_DIRECT_IO_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
int __init btrfs_init_dio(void);
|
|
void __cold btrfs_destroy_dio(void);
|
|
|
|
ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from);
|
|
ssize_t btrfs_direct_read(struct kiocb *iocb, struct iov_iter *to);
|
|
|
|
#endif /* BTRFS_DIRECT_IO_H */
|