Re: [PATCH 0/3] btrfs: ctree.he refactor
From: Josef Bacik <josef@toxicpanda.com>
Date: 2021-10-25 14:19:18
On Mon, Oct 25, 2021 at 05:08:18PM +0800, Qu Wenruo wrote:
Btrfs is abusing ctree.h for almost everything which doesn't have a better location to put its definitions. This makes ctree.h super congested for both kernel and btrfs-progs. Here is just several cleanups inspired by my WIP btrfs-fuse project. Currently my read-only (and still WIP) btrfs-fuse only has a ctree.h with less than 100 lines. The read-only project is definitely going to be much smaller than kernel, but there are several tricks I used to make ctree.h slim: - Put ondisk-format into ondisk_format.h - Put BTRFS_SET_GET_* macros into accessors.h - Put message output functions into messages.h So we will only really high level structure definitions in ctree.h Unfortunately for kernel, we still have tons of function definitions, which don't have proper headers for them. But this is still a good direction to go. Of course, any advice on the names of these new headers will be very helpful.
I hate it all because now I have to rebase my item changes onto this. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Thanks, Josef