• Filipe Manana's avatar
    btrfs: move the direct IO code into its own file · 9aa29a20
    Filipe Manana authored
    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: default avatarBoris Burkov <boris@bur.io>
    Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
    Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    9aa29a20
super.c 74.3 KB