Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dm vdo: add __counted_by attribute to a number of structures

This attribute allows the compiler to refine compile-time diagnostics
and run-time sanitizer features with information about the size of the
flexible arrays.

Signed-off-by: Ken Raeburn <raeburn@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

authored by

Ken Raeburn and committed by
Mikulas Patocka
db139186 9bb388b1

+8 -8
+1 -1
drivers/md/dm-vdo/block-map.h
··· 276 276 block_count_t next_entry_count; 277 277 278 278 zone_count_t zone_count; 279 - struct block_map_zone zones[]; 279 + struct block_map_zone zones[] __counted_by(zone_count); 280 280 }; 281 281 282 282 /**
+1 -1
drivers/md/dm-vdo/dedupe.c
··· 296 296 /* The number of zones */ 297 297 zone_count_t zone_count; 298 298 /* The hash zones themselves */ 299 - struct hash_zone zones[]; 299 + struct hash_zone zones[] __counted_by(zone_count); 300 300 }; 301 301 302 302 /* These are in milliseconds. */
+1 -1
drivers/md/dm-vdo/indexer/index.h
··· 53 53 54 54 index_callback_fn callback; 55 55 struct uds_request_queue *triage_queue; 56 - struct uds_request_queue *zone_queues[]; 56 + struct uds_request_queue *zone_queues[] __counted_by(zone_count); 57 57 }; 58 58 59 59 enum request_stage {
+1 -1
drivers/md/dm-vdo/indexer/open-chapter.h
··· 40 40 /* The number of slots in the hash table */ 41 41 unsigned int slot_count; 42 42 /* The hash table slots, referencing virtual record numbers */ 43 - struct open_chapter_zone_slot slots[]; 43 + struct open_chapter_zone_slot slots[] __counted_by(slot_count); 44 44 }; 45 45 46 46 int __must_check uds_make_open_chapter(const struct index_geometry *geometry,
+1 -1
drivers/md/dm-vdo/logical-zone.h
··· 60 60 /* The number of zones */ 61 61 zone_count_t zone_count; 62 62 /* The logical zones themselves */ 63 - struct logical_zone zones[]; 63 + struct logical_zone zones[] __counted_by(zone_count); 64 64 }; 65 65 66 66 int __must_check vdo_make_logical_zones(struct vdo *vdo,
+1 -1
drivers/md/dm-vdo/physical-zone.c
··· 200 200 /** @idle_list: A list containing all idle PBN lock instances. */ 201 201 struct list_head idle_list; 202 202 /** @locks: The memory for all the locks allocated by this pool. */ 203 - idle_pbn_lock locks[]; 203 + idle_pbn_lock locks[] __counted_by(capacity); 204 204 }; 205 205 206 206 /**
+1 -1
drivers/md/dm-vdo/repair.c
··· 127 127 * The page completions used for playing the journal into the block map, and, during 128 128 * read-only rebuild, for rebuilding the reference counts from the block map. 129 129 */ 130 - struct vdo_page_completion page_completions[]; 130 + struct vdo_page_completion page_completions[] __counted_by(page_count); 131 131 }; 132 132 133 133 /*
+1 -1
drivers/md/dm-vdo/slab-depot.h
··· 509 509 struct slab_summary_entry *summary_entries; 510 510 511 511 /* The block allocators for this depot */ 512 - struct block_allocator allocators[]; 512 + struct block_allocator allocators[] __counted_by(zone_count); 513 513 }; 514 514 515 515 struct reference_updater;