]> git.ipfire.org Git - thirdparty/linux.git/commit
dm-verity-fec: pass down index_in_region instead of rsb
authorEric Biggers <ebiggers@kernel.org>
Fri, 6 Feb 2026 04:59:38 +0000 (20:59 -0800)
committerMikulas Patocka <mpatocka@redhat.com>
Mon, 9 Mar 2026 14:13:35 +0000 (15:13 +0100)
commitb39b3c812eaf7956cc6f9ba570b75b5d52c8da62
treeb570b4d89342e087d6b03811169b5768f3fa3553
parentca21ed4089200ff32ef0a17f58b6153499121cef
dm-verity-fec: pass down index_in_region instead of rsb

Replace 'rsb', which is a byte index, with 'index_in_region' which is a
block index.  The block index is slightly easier to compute, it matches
what fec_read_bufs() wants, and it avoids the mismatch between the name
and the units of the variable.  ('rsb' stood for "Reed-Solomon block",
but its units were bytes, not blocks.)

fec_decode_bufs() does want it as a byte index when computing
parity_block, but that's easily handled locally.

As long as the parameters to the log messages are being adjusted, also
eliminate the unnecessary casts to 'unsigned long long'.  %llu is the
correct way to print a u64 in the Linux kernel, as documented in
printk-formats.rst.  There's no PRIu64 macro like there is in userspace.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-verity-fec.c