Skip to content

RFC Unlikely annotations for EIO/EUCLEAN/abort branches

David Sterba linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs: add unlikely annotations to branches leading to EUCLEANfs/btrfs/backref.c fs/btrfs/block-group.c fs/btrfs/ctree.c +16 more+105 -1050 replies
2/3btrfs: add unlikely annotations to branches leading to EIOfs/btrfs/backref.c fs/btrfs/bio.c fs/btrfs/ctree.c +16 more+83 -850 replies
3/3btrfs: add unlikely annotations to branches leading to transaction abortfs/btrfs/block-group.c fs/btrfs/ctree.c fs/btrfs/delayed-inode.c +6 more+96 -970 replies

Reviews trailers per patch

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

PatchFilipe Manana
SeriesR-b
1/3
2/3
3/3

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/3 RFC] Unlikely annotations for EIO/EUCLEAN/abort branches

Hi,

manually add unlikely annotations to the branches that lead to critical but rare errors. This is RFC as this has a big conflict surface. However this would be a one-time action, possibly done now before 6.18 freeze.

The base is current for-next (without series [1]):

text data bss dec hex filename

1650172  136289   15560 1802021  1b7f25 pre/btrfs.ko
1650934  136289   15560 1802783  1b821f post/btrfs.ko

DELTA: +762

There are differences in the generated assembly so the compiler does not detect the error branches as unlikely by itself (sometimes it does due to __cold function annotations).

I've used my prototype branch from some time ago so some of the annotations could be still missing, this is more about getting the idea of the scope.

[1] https://lore.kernel.org/linux-btrfs/[email protected]/

David Sterba (3):
btrfs: add unlikely annotations to branches leading to EUCLEAN
btrfs: add unlikely annotations to branches leading to EIO
btrfs: add unlikely annotations to branches leading to transaction
abort

 fs/btrfs/backref.c          | 24 ++++++-------
 fs/btrfs/bio.c              |  4 +--
 fs/btrfs/block-group.c      | 24 ++++++-------
 fs/btrfs/ctree.c            | 66 +++++++++++++++++------------------
 fs/btrfs/defrag.c           |  2 +-
 fs/btrfs/delayed-inode.c    |  2 +-
 fs/btrfs/dev-replace.c      | 10 +++---
 fs/btrfs/disk-io.c          | 48 +++++++++++++-------------
 fs/btrfs/export.c           |  2 +-
 fs/btrfs/extent-tree.c      | 68 ++++++++++++++++++-------------------
 fs/btrfs/extent_io.c        |  2 +-
 fs/btrfs/extent_map.c       |  2 +-
 fs/btrfs/file-item.c        |  2 +-
 fs/btrfs/file.c             | 45 ++++++++++++------------
 fs/btrfs/free-space-cache.c |  2 +-
 fs/btrfs/free-space-tree.c  | 24 ++++++-------
 fs/btrfs/inode.c            | 58 +++++++++++++++----------------
 fs/btrfs/ioctl.c            |  6 ++--
 fs/btrfs/lzo.c              |  6 ++--
 fs/btrfs/qgroup.c           | 18 +++++-----
 fs/btrfs/raid56.c           | 14 ++++----
 fs/btrfs/relocation.c       | 14 ++++----
 fs/btrfs/root-tree.c        |  6 ++--
 fs/btrfs/scrub.c            | 18 +++++-----
 fs/btrfs/send.c             | 12 +++----
 fs/btrfs/super.c            |  6 ++--
 fs/btrfs/verity.c           |  4 +--
 fs/btrfs/volumes.c          | 30 ++++++++--------
 fs/btrfs/zoned.c            | 50 +++++++++++++--------------
 fs/btrfs/zstd.c             |  2 +-
 30 files changed, 284 insertions(+), 287 deletions(-)
Signature · 1 line
2.51.0