diff options
| author | Filipe Manana <fdmanana@suse.com> | 2024-06-25 15:52:28 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2024-07-11 15:33:29 +0200 |
| commit | 9aa29a20b70097213d10e03a452366ceea72fc02 (patch) | |
| tree | 89fe7abede50ea54f9914c5cf5f0f3a1fa532e65 /fs/btrfs/file.h | |
| parent | 0d9b7e166aef9f6d6dc574155cce293a2b6bf190 (diff) | |
btrfs: move the direct IO code into its own file
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>
Diffstat (limited to 'fs/btrfs/file.h')
| -rw-r--r-- | fs/btrfs/file.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/file.h b/fs/btrfs/file.h index ce93ed7083ab..912254e653cf 100644 --- a/fs/btrfs/file.h +++ b/fs/btrfs/file.h @@ -44,5 +44,7 @@ void btrfs_check_nocow_unlock(struct btrfs_inode *inode); bool btrfs_find_delalloc_in_range(struct btrfs_inode *inode, u64 start, u64 end, struct extent_state **cached_state, u64 *delalloc_start_ret, u64 *delalloc_end_ret); +int btrfs_write_check(struct kiocb *iocb, struct iov_iter *from, size_t count); +ssize_t btrfs_buffered_write(struct kiocb *iocb, struct iov_iter *i); #endif |
