diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-11-19 16:43:11 +0000 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-11-25 01:53:33 +0100 |
| commit | 7c3acdb998dd723ac791cd4a47f13599d76a1f58 (patch) | |
| tree | 48a64b5ab6d4223be33f3370999253fcebdd0b0c /tools/lib/python/kdoc/enrich_formatter.py | |
| parent | 139e3167d81143f9cd719fde420a825dae7b711d (diff) | |
btrfs: send: add unlikely to all unexpected overflow checks
There are several checks for unexpected overflows of buffers and path
lengths that makes us fail the send operation with an error if for some
highly unexpected reason they happen. So add the unlikely tag to those
checks to hint the compiler to generate better code, while also making
it more explicit in the source that it's highly unexpected.
With gcc 14.2.0-19 from Debian on x86_64, I also got a small reduction
the text size of the btrfs module.
Before:
$ size fs/btrfs/btrfs.ko
text data bss dec hex filename
1936917 162723 15592 2115232 2046a0 fs/btrfs/btrfs.ko
After:
$ size fs/btrfs/btrfs.ko
text data bss dec hex filename
1936789 162723 15592 2115104 204620 fs/btrfs/btrfs.ko
Reviewed-by: Qu Wenruo <wqu@suse.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 'tools/lib/python/kdoc/enrich_formatter.py')
0 files changed, 0 insertions, 0 deletions
