btrfs: move the tree mod log code into its own file
authorFilipe Manana <fdmanana@suse.com>
Thu, 11 Mar 2021 14:31:07 +0000 (14:31 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Apr 2021 15:25:16 +0000 (17:25 +0200)
commitf3a84ccd28d0b04da0358cf1289706f3469ff9ad
tree7a352d2aadb047d6841b333462b94eb5f19b286f
parent9a002d531b30bfe81d900f61a5ca955a85fab0e6
btrfs: move the tree mod log code into its own file

The tree modification log, which records modifications done to btrees, is
quite large and currently spread all over ctree.c, which is a huge file
already.

To make things better organized, move all that code into its own separate
source and header files. Functions and definitions that are used outside
of the module (mostly by ctree.c) are renamed so that they start with a
"btrfs_" prefix. Everything else remains unchanged.

This makes it easier to go over the tree modification log code every
time I need to go read it to fix a bug.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ minor comment updates ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/Makefile
fs/btrfs/backref.c
fs/btrfs/ctree.c
fs/btrfs/ctree.h
fs/btrfs/delayed-ref.c
fs/btrfs/qgroup.c
fs/btrfs/tree-mod-log.c [new file with mode: 0644]
fs/btrfs/tree-mod-log.h [new file with mode: 0644]