diff options
author | Kees Cook <[email protected]> | 2023-05-12 14:22:12 -0700 |
---|---|---|
committer | Kees Cook <[email protected]> | 2023-05-30 16:41:52 -0700 |
commit | 2f088dfc1878108748018af0d2e3748ba9eee1e9 (patch) | |
tree | b8bca628f76deb84c5e84e6c369c023d4a70ba38 /tools/perf/scripts/python/Perf-Trace-Util/lib | |
parent | d67790ddf0219aa0ad3e13b53ae0a7619b3425a2 (diff) |
md/raid5: Convert stripe_head's "dev" to flexible array member
Replace old-style 1-element array of "dev" in struct stripe_head with
modern C99 flexible array. In the future, we can additionally annotate
it with the run-time size, found in the "disks" member.
Cc: Song Liu <[email protected]>
Cc: [email protected]
Reviewed-by: Christoph Hellwig <[email protected]>
Acked-by: Song Liu <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/lkml/[email protected]/
---
It looks like this memory calculation:
memory = conf->min_nr_stripes * (sizeof(struct stripe_head) +
max_disks * ((sizeof(struct bio) + PAGE_SIZE))) / 1024;
... was already buggy (i.e. it included the single "dev" bytes in the
result). However, I'm not entirely sure if that is the right analysis,
since "dev" is not related to struct bio nor PAGE_SIZE?
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib')
0 files changed, 0 insertions, 0 deletions