]> www.infradead.org Git - nvme.git/commit
btrfs: move the direct IO code into its own file
authorFilipe Manana <fdmanana@suse.com>
Tue, 25 Jun 2024 14:52:28 +0000 (15:52 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:29 +0000 (15:33 +0200)
commit9aa29a20b70097213d10e03a452366ceea72fc02
tree89fe7abede50ea54f9914c5cf5f0f3a1fa532e65
parent0d9b7e166aef9f6d6dc574155cce293a2b6bf190
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>
fs/btrfs/Makefile
fs/btrfs/btrfs_inode.h
fs/btrfs/direct-io.c [new file with mode: 0644]
fs/btrfs/direct-io.h [new file with mode: 0644]
fs/btrfs/file.c
fs/btrfs/file.h
fs/btrfs/inode.c
fs/btrfs/super.c