]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bcachefs: bch2_disk_accounting_mod2()
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 21 Mar 2025 16:29:56 +0000 (12:29 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 24 Mar 2025 13:50:37 +0000 (09:50 -0400)
commitf4a584f4bf64e0db30312088d504d4da29ca556b
tree48dd7bdecc41978a05c0f2d1580e5b97d0b75e53
parent5ae6f33053af6e904e609593d05e4faf3aeb16fb
bcachefs: bch2_disk_accounting_mod2()

We're hitting some issues with uninitialized struct padding, flagged by
kmsan.

They appear to be falso positives, otherwise bch2_accounting_validate()
would have flagged them as "junk at end". But for now, we'll need to
initialize disk_accounting_pos with memset().

This adds a new helper, bch2_disk_accounting_mod2(), that initializes a
disk_accounting_pos and does the accounting mod all at once - so overall
things actually get slightly more ergonomic.

BCH_DISK_ACCOUNTING_replicas keys are left for now; KMSAN isn't warning
about them and they're a bit special.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_background.c
fs/bcachefs/buckets.c
fs/bcachefs/disk_accounting.h
fs/bcachefs/disk_accounting_format.h
fs/bcachefs/inode.c
fs/bcachefs/super.c