Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH 0/3 RFC] Unlikely annotations for EIO/EUCLEAN/abort branches
@ 2025-09-17 17:53 David Sterba
  2025-09-17 17:53 ` [PATCH 1/3] btrfs: add unlikely annotations to branches leading to EUCLEAN David Sterba
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: David Sterba @ 2025-09-17 17:53 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba

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/cover.1758095164.git.fdmanana@suse.com/

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(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-09-22 11:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-17 17:53 [PATCH 0/3 RFC] Unlikely annotations for EIO/EUCLEAN/abort branches David Sterba
2025-09-17 17:53 ` [PATCH 1/3] btrfs: add unlikely annotations to branches leading to EUCLEAN David Sterba
2025-09-17 17:53 ` [PATCH 2/3] btrfs: add unlikely annotations to branches leading to EIO David Sterba
2025-09-17 17:53 ` [PATCH 3/3] btrfs: add unlikely annotations to branches leading to transaction abort David Sterba
2025-09-18 15:03 ` [PATCH 0/3 RFC] Unlikely annotations for EIO/EUCLEAN/abort branches Filipe Manana
2025-09-22 11:15   ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox