Re: [GIT PULL] bcachefs

From: Nathan Chancellor
Date: Sun Nov 17 2024 - 19:55:09 EST


Hi Kent,

On Fri, Nov 15, 2024 at 03:35:16PM -0500, Kent Overstreet wrote:
> bcachefs: Kill bch2_get_next_backpointer()

As pointed out by the kbuild test robot [1], this change introduces several
-Wuninitialized warnings:

fs/bcachefs/move.c:814:36: error: variable 'dirty_sectors' is uninitialized when used here [-Werror,-Wuninitialized]
814 | trace_evacuate_bucket(c, &bucket, dirty_sectors, bucket_size, fragmentation, ret);
| ^~~~~~~~~~~~~
fs/bcachefs/move.c:677:24: note: initialize the variable 'dirty_sectors' to silence this warning
677 | unsigned dirty_sectors, bucket_size;
| ^
| = 0
fs/bcachefs/move.c:814:51: error: variable 'bucket_size' is uninitialized when used here [-Werror,-Wuninitialized]
814 | trace_evacuate_bucket(c, &bucket, dirty_sectors, bucket_size, fragmentation, ret);
| ^~~~~~~~~~~
fs/bcachefs/move.c:677:37: note: initialize the variable 'bucket_size' to silence this warning
677 | unsigned dirty_sectors, bucket_size;
| ^
| = 0
fs/bcachefs/move.c:814:64: error: variable 'fragmentation' is uninitialized when used here [-Werror,-Wuninitialized]
814 | trace_evacuate_bucket(c, &bucket, dirty_sectors, bucket_size, fragmentation, ret);
| ^~~~~~~~~~~~~
fs/bcachefs/move.c:678:19: note: initialize the variable 'fragmentation' to silence this warning
678 | u64 fragmentation;
| ^
| = 0
3 errors generated.

I see you were already sent a change [2] to fix this but the fix should
go with the problematic change atomically. Build failures during the
merge window suck because they potentially hide other issues. I have a
further comment on that patch that I will send shortly.

[1]: https://lore.kernel.org/202411171154.RatlgkMz-lkp@xxxxxxxxx/
[2]: https://lore.kernel.org/20241117234334.722730-4-pZ010001011111@xxxxxxxxx/

Cheers,
Nathan