Skip to content

btrfs: move the space_info code out of extent-tree.c

Josef Bacik linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11btrfs: move space_info to space_info.hfs/btrfs/ctree.h fs/btrfs/extent-tree.c fs/btrfs/free-space-cache.c +5 more+88 -720 replies
2/11btrfs: rename do_chunk_alloc to btrfs_chunk_allocfs/btrfs/ctree.h fs/btrfs/extent-tree.c+36 -360 replies
3/11btrfs: export space_info_add_*_bytesfs/btrfs/extent-tree.c fs/btrfs/space-info.h+26 -220 replies
4/11btrfs: move the space_info handling code to space-info.cfs/btrfs/Makefile fs/btrfs/extent-tree.c fs/btrfs/space-info.c +1 more+208 -1873 replies
5/11btrfs: move and export can_overcommitfs/btrfs/extent-tree.c fs/btrfs/space-info.c fs/btrfs/space-info.h+80 -750 replies
6/11btrfs: move the space info update macro to space-info.hfs/btrfs/extent-tree.c fs/btrfs/space-info.h+53 -370 replies
7/11btrfs: move btrfs_space_info_add_*_bytes to space-info.cfs/btrfs/extent-tree.c fs/btrfs/space-info.c fs/btrfs/space-info.h+114 -1140 replies
8/11btrfs: export block_rsv_use_bytesfs/btrfs/ctree.h fs/btrfs/extent-tree.c+8 -80 replies
9/11btrfs: move dump_space_info to space-info.cfs/btrfs/extent-tree.c fs/btrfs/space-info.c fs/btrfs/space-info.h+65 -630 replies
10/11btrfs: move reserve_metadata_bytes and supporting code to space-info.cfs/btrfs/extent-tree.c fs/btrfs/space-info.c fs/btrfs/space-info.h+710 -7020 replies
11/11btrfs: unexport can_overcommitfs/btrfs/space-info.c fs/btrfs/space-info.h+11 -160 replies

Reviews trailers per patch

None of the 11 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchNikolay Borisov
SeriesR-b
1/11
2/11
3/11
4/11
5/11
6/11
7/11
8/11
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/11] btrfs: move the space_info code out of extent-tree.c

This is the first pass at making extent-tree.c much smaller. I've purposefully done no other cleanups or changes. The places where I needed to modify callers were done in separate patches. The only time I moved and changed callers in large chunks was the moving of reserve_metadata_bytes out of extent-tree.c, and that was just to rename the users of reserve_metadata_bytes to btrfs_reserve_metadata_bytes.

There is 0 functional change in this series. The next step is to move the other space reservation code that is specific to delayed_refs, inodes, etc. But I wanted to start with this to make sure we're all onboard with this approach before I do other things.

The diffstat for the whole series is the following

 fs/btrfs/Makefile           |    2 +-
 fs/btrfs/ctree.h            |   97 +---
 fs/btrfs/extent-tree.c      | 1277 +++----------------------------------------
 fs/btrfs/free-space-cache.c |    1 +
 fs/btrfs/ioctl.c            |    1 +
 fs/btrfs/space-info.c       | 1103 +++++++++++++++++++++++++++++++++++++
 fs/btrfs/space-info.h       |  135 +++++
 fs/btrfs/super.c            |    1 +
 fs/btrfs/sysfs.c            |    1 +
 fs/btrfs/volumes.c          |    1 +
 10 files changed, 1343 insertions(+), 1276 deletions(-)

Thanks,

Josef