Skip to content

btrfs: inode management and memory consumption improvements

[email protected] linux-btrfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest10 patches 4 repliesIn review
  2. v18 patches 13 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10btrfs: use an xarray to track open inodes in a rootfs/btrfs/btrfs_inode.h fs/btrfs/ctree.h fs/btrfs/disk-io.c +1 more+58 -861 reply
2/10btrfs: preallocate inodes xarray entry to avoid transaction abortfs/btrfs/inode.c+19 -70 replies
3/10btrfs: reduce nesting and deduplicate error handling at btrfs_iget_path()fs/btrfs/inode.c+21 -230 replies
4/10btrfs: remove inode_lock from struct btrfs_root and use xarray locksfs/btrfs/ctree.h fs/btrfs/delayed-inode.c fs/btrfs/disk-io.c +1 more+20 -260 replies
5/10btrfs: unify index_cnt and csum_bytes from struct btrfs_inodefs/btrfs/btrfs_inode.h fs/btrfs/delayed-inode.c fs/btrfs/inode.c +2 more+54 -310 replies
6/10btrfs: don't allocate file extent tree for non regular filesfs/btrfs/file-item.c fs/btrfs/inode.c+42 -240 replies
7/10btrfs: remove location key from struct btrfs_inodefs/btrfs/btrfs_inode.h fs/btrfs/disk-io.c fs/btrfs/export.c +4 more+63 -330 replies
8/10btrfs: remove objectid from struct btrfs_inode on 64 bits platformsfs/btrfs/btrfs_inode.h fs/btrfs/disk-io.c fs/btrfs/export.c +3 more+45 -340 replies
9/10btrfs: rename rb_root member of extent_map_tree from map to rootfs/btrfs/extent_map.c fs/btrfs/extent_map.h fs/btrfs/tests/extent-map-tests.c+15 -150 replies
10/10btrfs: use a regular rb_root instead of cached rb_root for extent_map_treefs/btrfs/extent_map.c fs/btrfs/extent_map.h fs/btrfs/tests/extent-map-tests.c+30 -261 reply

Reviews trailers per patch

6 of 10 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchQu WenruoDavid Sterba
SeriesR-b
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10
8/10
9/10
10/10

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

Read the v2 thread

Cover letter [PATCH v2 00/10] btrfs: inode management and memory consumption improvements

From: Filipe Manana <[email protected]>

Some inode related improvements, to use an xarray to track open inodes per root instead of a red black tree, reduce lock contention and use less memory per btrfs inode, so now we can fit 4 inodes per 4K page instead of 3. More details in the change logs.

V2: Added two more patches (9/10 and 10/10) to make sure btrfs_inode size
is reduced to 1024 bytes when CONFIG_FS_ENCRYPTION and CONFIG_FS_VERITY are set. I wasn't using these configs before, and with them the final size for btrfs_inode was 1032 bytes and not 1016 bytes as I initially had - now the final size is 1024 bytes with those configs enabled.

Filipe Manana (10):
btrfs: use an xarray to track open inodes in a root
btrfs: preallocate inodes xarray entry to avoid transaction abort
btrfs: reduce nesting and deduplicate error handling at btrfs_iget_path()
btrfs: remove inode_lock from struct btrfs_root and use xarray locks
btrfs: unify index_cnt and csum_bytes from struct btrfs_inode
btrfs: don't allocate file extent tree for non regular files
btrfs: remove location key from struct btrfs_inode
btrfs: remove objectid from struct btrfs_inode on 64 bits platforms
btrfs: rename rb_root member of extent_map_tree from map to root
btrfs: use a regular rb_root instead of cached rb_root for extent_map_tree

 fs/btrfs/btrfs_inode.h            | 130 ++++++++++----
 fs/btrfs/ctree.h                  |   8 +-
 fs/btrfs/delayed-inode.c          |  29 ++-
 fs/btrfs/disk-io.c                |  12 +-
 fs/btrfs/export.c                 |   2 +-
 fs/btrfs/extent_map.c             |  50 +++---
 fs/btrfs/extent_map.h             |   2 +-
 fs/btrfs/file-item.c              |  13 +-
 fs/btrfs/inode.c                  | 286 +++++++++++++++---------------
 fs/btrfs/ioctl.c                  |   8 +-
 fs/btrfs/relocation.c             |  12 +-
 fs/btrfs/tests/btrfs-tests.c      |   5 +-
 fs/btrfs/tests/extent-map-tests.c |   6 +-
 fs/btrfs/tree-log.c               |   9 +-
 14 files changed, 317 insertions(+), 255 deletions(-)
Signature · 1 line
2.43.0