]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dm vdo: update vdo_allocate_extended to take a field name, no types
authorKen Raeburn <raeburn@redhat.com>
Fri, 27 Feb 2026 01:12:06 +0000 (20:12 -0500)
committerMikulas Patocka <mpatocka@redhat.com>
Mon, 2 Mar 2026 16:03:18 +0000 (17:03 +0100)
commit6af58aa3b028e364c0a8f8b6be48fca17e571de3
treefc42a34c760213832c89f9cafc691e8c073c44f4
parent5282ac80183bd25e44c4f5f52a7f46e9a54289eb
dm vdo: update vdo_allocate_extended to take a field name, no types

All of VDO's "extended" allocations use a flexible array field at the
end of the allocated structure. We can infer the struct type from the
supplied pointer. Replacing the array field type with the field name
lets us use struct_size from overflow.h to compute the size instead of
the local __vdo_do_allocation version.

One allocation of bio structures doesn't conform to this pattern,
since the removal of bi_inline_vecs; directly compute the total size
for that case.

Signed-off-by: Ken Raeburn <raeburn@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
17 files changed:
drivers/md/dm-vdo/block-map.c
drivers/md/dm-vdo/data-vio.c
drivers/md/dm-vdo/dedupe.c
drivers/md/dm-vdo/indexer/index-layout.c
drivers/md/dm-vdo/indexer/index.c
drivers/md/dm-vdo/indexer/open-chapter.c
drivers/md/dm-vdo/indexer/radix-sort.c
drivers/md/dm-vdo/io-submitter.c
drivers/md/dm-vdo/logical-zone.c
drivers/md/dm-vdo/memory-alloc.h
drivers/md/dm-vdo/packer.c
drivers/md/dm-vdo/physical-zone.c
drivers/md/dm-vdo/priority-table.c
drivers/md/dm-vdo/recovery-journal.c
drivers/md/dm-vdo/repair.c
drivers/md/dm-vdo/slab-depot.c
drivers/md/dm-vdo/vio.c