On 2026-10-22 12:56 -0700, Alison Schofield wrote:
> Existing tests use single-range devices and cannot detect incorrect memory
> block accounting across discontiguous mappings. A two-range device exposed
> this bug by reporting only one of its two blocks.
>
> Create a device with two separated mappings and verify its memory block
> count against the expected count from both mappings.
>
> Signed-off-by: Alison Schofield <[email protected]>
I think this misses an over-count scenario:
A=dax0.1 create 512M
B=dax0.2 create 512M
destroy A
C=dax0.1 create 1G -> hole before B + space after B
140...15ff... dax0.1
160...17ff... dax0.2
180...19ff... dax0.1
Not sure if you want to extend the test to add that or not, or if it's
out of scope. But the test as-written otherwise seems ok.
Reviewed-by: Gregory Price (Meta) <[email protected]>
--
Gregory Price (Meta) <[email protected]>