Skip to content

Minor cleanups in locking helpers

David Sterba linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4btrfs: make locking assertion helpers static inlinefs/btrfs/locking.c+10 -100 replies
2/4btrfs: make btrfs_assert_tree_locked static inlinefs/btrfs/locking.c fs/btrfs/locking.h+9 -70 replies
3/4btrfs: move btrfs_set_path_blocking to other locking functionsfs/btrfs/ctree.c fs/btrfs/locking.c fs/btrfs/locking.h+28 -250 replies
4/4btrfs: move btrfs_unlock_up_safe to other locking functionsfs/btrfs/ctree.c fs/btrfs/ctree.h fs/btrfs/delayed-inode.c +2 more+28 -270 replies

Reviews trailers per patch

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

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

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/4] Minor cleanups in locking helpers

Reorganizing code wrt locking helpers, minor text and stack savings.

Debugging build
~~~~~~~~~~~~~~~

text data bss dec hex filename

1513898  146192   27496 1687586  19c022 pre/btrfs.ko
1514206  146768   27496 1688470  19c396 post/btrfs.ko

DELTA: +308
^^^^^^^^^^^ the increase is caused by inlining the
btrfs_assert_tree_locked itself, IMO acceptable for debugging build

Stack report:

btrfs_clean_tree_block                                             -8 (24 -> 16)
btrfs_drop_subtree                                                 +8 (104 -> 112)
btrfs_mark_buffer_dirty                                            -8 (32 -> 24)
insert_ptr                                                         -8 (80 -> 72)

LOST (64):
btrfs_assert_tree_read_locked 8
btrfs_assert_spinning_writers_get 16
btrfs_assert_spinning_readers_put 16
btrfs_assert_spinning_writers_put 16
btrfs_assert_tree_locked 8

NEW (0):

LOST/NEW DELTA:      -64
PRE/POST DELTA:      -80

Release build
~~~~~~~~~~~~~

text data bss dec hex filename

1079643   17304   14912 1111859  10f733 pre/btrfs.ko
1079468   17316   14912 1111696  10f690 post/btrfs.ko

DELTA: -175
^^^^^^^^^^^ that's what counts

Stack report:

btrfs_drop_subtree                                                 -8 (80 -> 72)
btrfs_clean_tree_block                                             -8 (24 -> 16)
btrfs_mark_buffer_dirty                                            -8 (32 -> 24)
insert_ptr                                                         -8 (80 -> 72)

LOST (8):
btrfs_assert_tree_locked 8

NEW (0):

LOST/NEW DELTA:       -8
PRE/POST DELTA:      -4

David Sterba (4):
btrfs: make locking assertion helpers static inline
btrfs: make btrfs_assert_tree_locked static inline
btrfs: move btrfs_set_path_blocking to other locking functions
btrfs: move btrfs_unlock_up_safe to other locking functions

 fs/btrfs/ctree.c         | 51 --------------------------
 fs/btrfs/ctree.h         |  1 -
 fs/btrfs/delayed-inode.c |  1 +
 fs/btrfs/locking.c       | 78 +++++++++++++++++++++++++++++++---------
 fs/btrfs/locking.h       | 13 ++++++-
 5 files changed, 75 insertions(+), 69 deletions(-)
Signature · 1 line
2.23.0