block_count_t next_entry_count;
zone_count_t zone_count;
- struct block_map_zone zones[];
+ struct block_map_zone zones[] __counted_by(zone_count);
};
/**
/* The number of zones */
zone_count_t zone_count;
/* The hash zones themselves */
- struct hash_zone zones[];
+ struct hash_zone zones[] __counted_by(zone_count);
};
/* These are in milliseconds. */
index_callback_fn callback;
struct uds_request_queue *triage_queue;
- struct uds_request_queue *zone_queues[];
+ struct uds_request_queue *zone_queues[] __counted_by(zone_count);
};
enum request_stage {
/* The number of slots in the hash table */
unsigned int slot_count;
/* The hash table slots, referencing virtual record numbers */
- struct open_chapter_zone_slot slots[];
+ struct open_chapter_zone_slot slots[] __counted_by(slot_count);
};
int __must_check uds_make_open_chapter(const struct index_geometry *geometry,
/* The number of zones */
zone_count_t zone_count;
/* The logical zones themselves */
- struct logical_zone zones[];
+ struct logical_zone zones[] __counted_by(zone_count);
};
int __must_check vdo_make_logical_zones(struct vdo *vdo,
/** @idle_list: A list containing all idle PBN lock instances. */
struct list_head idle_list;
/** @locks: The memory for all the locks allocated by this pool. */
- idle_pbn_lock locks[];
+ idle_pbn_lock locks[] __counted_by(capacity);
};
/**
* The page completions used for playing the journal into the block map, and, during
* read-only rebuild, for rebuilding the reference counts from the block map.
*/
- struct vdo_page_completion page_completions[];
+ struct vdo_page_completion page_completions[] __counted_by(page_count);
};
/*
struct slab_summary_entry *summary_entries;
/* The block allocators for this depot */
- struct block_allocator allocators[];
+ struct block_allocator allocators[] __counted_by(zone_count);
};
struct reference_updater;