diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-10-22 19:15:00 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-11-24 22:20:29 +0100 |
| commit | 38e03b820e00196018a7ad2523a3c45653b4927d (patch) | |
| tree | 92257f36c96a8e7ef38ffa0049d2269adf754356 /fs/btrfs/scrub.c | |
| parent | f912f0af13aebfd5634ba68c1a077e9a59fca47a (diff) | |
btrfs: annotate as unlikely fs aborted checks in space flushing code
It's not expected to have the fs in an aborted state, so surround the
abortion checks with unlikely to make it clear it's unexpected and to
hint the compiler to generate better code.
Also at maybe_fail_all_tickets() untangle all repeated checks for the
abortion into a single if-then-else. This makes things more readable
and makes the compiler generate less code. On x86_64 with gcc 14.2.0-19
from Debian I got the following object size differences.
Before this change:
$ size fs/btrfs/btrfs.ko
text data bss dec hex filename
2021606 179704 25088 2226398 21f8de fs/btrfs/btrfs.ko
After this change:
$ size fs/btrfs/btrfs.ko
text data bss dec hex filename
2021458 179704 25088 2226250 21f84a fs/btrfs/btrfs.ko
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/scrub.c')
0 files changed, 0 insertions, 0 deletions