Guangli Dai
1dfa6f7aa4
Replace PAI vtable dispatch with direct calls
...
The pai_t interface implements C-style polymorphism via function pointers
to abstract over PAC and HPA. This abstraction provides no real benefit:
only two implementations exist, the dispatcher already knows which one to
use, and HPA stubs 2 of 5 operations. Remove the runtime dispatch in
favor of direct calls.
This commit:
- Promotes pac_alloc/expand/shrink/dalloc/time_until_deferred_work to
external linkage and replaces the pai_t *self parameter with pac_t *pac.
- Promotes hpa_alloc/expand/shrink/dalloc/time_until_deferred_work to
external linkage and replaces pai_t *self with hpa_shard_t *shard.
- Updates hpa_dalloc_batch's signature to take hpa_shard_t * directly
and removes the hpa_from_pai container-of helper. Updates internal
callers in hpa_alloc, hpa_dalloc, and hpa_sec_flush_impl.
- Drops the vtable assignments from pac_init() and hpa_shard_init().
- Replaces pai_alloc/dalloc/etc. dispatch in pa.c with direct calls.
HPA expand and shrink (which are unconditional failure stubs) are
skipped entirely for HPA-owned extents.
- Removes the pa_get_pai() helper.
- Updates tests in test/unit/hpa.c and test/unit/hpa_sec_integration.c
to call hpa_alloc/dalloc/etc. directly.
The pai_t struct field stays as dead weight in pac_t and hpa_shard_t;
it is removed in the next commit along with pai.h itself.
No behavioral changes.
2026-05-12 13:43:16 -07:00
..
2026-04-30 15:17:18 -04:00
2026-03-10 18:14:33 -07:00
2020-10-24 20:43:44 -07:00
2017-02-23 08:57:02 -08:00
2017-02-23 08:57:02 -08:00
2026-03-10 18:14:33 -07:00
2026-04-30 15:17:18 -04:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2020-07-31 09:16:50 -07:00
2020-07-31 09:16:50 -07:00
2026-03-10 18:14:33 -07:00
2020-07-31 09:16:50 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2025-05-28 19:21:49 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-04-01 23:15:19 -04:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2020-10-15 10:03:16 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-05-05 10:44:28 -07:00
2026-05-12 13:14:39 -04:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-04-30 15:17:18 -04:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-05-12 13:43:16 -07:00
2026-03-10 18:14:33 -07:00
2026-05-12 13:43:16 -07:00
2026-03-10 18:14:33 -07:00
2026-05-12 13:43:16 -07:00
2026-03-10 18:14:33 -07:00
2026-05-12 13:43:16 -07:00
2025-04-25 19:19:03 -07:00
2026-05-12 13:43:16 -07:00
2026-03-10 18:14:33 -07:00
2026-05-12 13:43:16 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2021-12-22 20:10:28 -08:00
2026-05-11 16:23:09 -07:00
2026-04-01 23:15:19 -04:00
2017-02-23 08:57:02 -08:00
2017-02-23 08:57:02 -08:00
2017-02-23 08:57:02 -08:00
2017-02-23 08:57:02 -08:00
2026-03-10 18:14:33 -07:00
2017-02-23 08:57:02 -08:00
2026-04-01 23:15:19 -04:00
2026-03-10 18:14:33 -07:00
2026-04-01 23:15:19 -04:00
2026-03-10 18:14:33 -07:00
2020-03-31 06:25:08 -07:00
2026-04-01 23:15:19 -04:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-04-01 23:15:19 -04:00
2026-03-10 18:14:33 -07:00
2017-05-18 11:33:45 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2017-02-23 08:57:02 -08:00
2026-03-10 18:14:33 -07:00
2021-12-22 20:10:28 -08:00
2026-03-10 18:14:33 -07:00
2024-04-09 12:57:01 -07:00
2026-03-10 18:14:33 -07:00
2022-09-12 13:56:22 -07:00
2026-03-10 18:14:33 -07:00
2017-04-21 10:06:12 -07:00
2026-03-10 18:14:33 -07:00
2021-12-22 20:10:28 -08:00
2026-03-10 18:14:33 -07:00
2020-06-29 14:27:50 -07:00
2026-03-10 18:14:33 -07:00
2023-05-11 09:10:57 -07:00
2026-03-10 18:14:33 -07:00
2019-12-30 15:58:57 -08:00
2026-03-10 18:14:33 -07:00
2023-07-03 16:19:06 -07:00
2026-03-10 18:14:33 -07:00
2021-12-22 20:10:28 -08:00
2026-03-10 18:14:33 -07:00
2021-12-22 20:10:28 -08:00
2026-03-10 18:14:33 -07:00
2021-12-22 20:10:28 -08:00
2026-03-10 18:14:33 -07:00
2017-02-23 08:57:02 -08:00
2026-03-26 10:39:37 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2021-12-22 20:10:28 -08:00
2026-04-01 23:15:19 -04:00
2026-03-10 18:14:33 -07:00
2021-12-15 10:39:17 -08:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2021-12-22 20:10:28 -08:00
2026-03-10 18:14:33 -07:00
2025-05-06 14:47:35 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-04-01 23:15:19 -04:00
2024-06-25 12:59:45 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2019-11-04 11:15:50 -08:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2026-03-10 18:14:33 -07:00
2019-10-29 17:48:44 -07:00
2026-03-10 18:14:33 -07:00
2022-04-20 10:27:25 -07:00
2026-03-10 18:14:33 -07:00
2019-10-29 17:48:44 -07:00
2026-03-10 18:14:33 -07:00
2019-10-29 17:48:44 -07:00
2026-03-10 18:14:33 -07:00
2017-02-23 08:57:02 -08:00