Skip to content

Reduce size of extent_io_tree, remove fs_info

David Sterba linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5btrfs: move lockdep class setting out of extent_io_tree_initfs/btrfs/extent-io-tree.c fs/btrfs/inode.c+11 -100 replies
2/5btrfs: drop error message in extent_io_tree insert_state()fs/btrfs/extent-io-tree.c+0 -30 replies
3/5btrfs: constify fs_info parameter in __btrfs_panic()fs/btrfs/messages.c fs/btrfs/messages.h+2 -20 replies
4/5btrfs: enhance extent_io_tree error reportsfs/btrfs/extent-io-tree.c+14 -100 replies
5/5btrfs: always set extent_io_tree::inode and drop fs_infofs/btrfs/extent-io-tree.c fs/btrfs/extent-io-tree.h fs/btrfs/inode.c +2 more+93 -550 replies

Reviews trailers per patch

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

PatchJosef Bacik
SeriesR-b
1/5
2/5
3/5
4/5
5/5

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 0/5] Reduce size of extent_io_tree, remove fs_info

We have the fs_info pointer in extent_io_tree for the trace points as the inode is not always set. This is a bit wasteful and extent_io_tree is also embedded in other structures. The tree owner can be used to determine if the inode is expected to be non-NULL, otherwise we can store the fs_info pointer.

I tried to do it in the cleanest way, union and access wrappers, it's IMO worth the space savings:

- btrfs_inode 1104 -> 1088
- btrfs_device 520 -> 512
- btrfs_root 1360 -> 1344
- btrfs_transaction 456 -> 440
- btrfs_fs_info 3600 -> 3592
- reloc_control 1520 -> 1512

The btrfs_inode structure is getting closer to the 1024 size where it would pack better in the slab pages.

David Sterba (5):
btrfs: move lockdep class setting out of extent_io_tree_init
btrfs: drop error message in extent_io_tree insert_state()
btrfs: constify fs_info parameter in __btrfs_panic()
btrfs: enhance extent_io_tree error reports
btrfs: always set extent_io_tree::inode and drop fs_info

 fs/btrfs/extent-io-tree.c    | 113 ++++++++++++++++++++++-------------
 fs/btrfs/extent-io-tree.h    |  18 +++++-
 fs/btrfs/inode.c             |  14 +++++
 fs/btrfs/messages.c          |   2 +-
 fs/btrfs/messages.h          |   2 +-
 fs/btrfs/tests/btrfs-tests.c |   2 +-
 include/trace/events/btrfs.h |  45 +++++---------
 7 files changed, 118 insertions(+), 78 deletions(-)
Signature · 1 line
2.42.1