Re: [PATCH V3 2/9] dax/fsdev: fix multi-range offset in memory_failure handler
From: Alison Schofield
Date: Tue Jun 02 2026 - 20:15:05 EST
On Sat, May 30, 2026 at 04:50:42PM +0000, John Groves wrote:
> From: John Groves <John@xxxxxxxxxx>
>
> Fix memory_failure offset calculation for multi-range devices. The old code
> subtracted ranges[0].range.start from the faulting PFN's physical address,
> which produces an incorrect (inflated) logical offset when the PFN falls in
> ranges[1] or beyond due to physical gaps between ranges. Add
> fsdev_pfn_to_offset() to walk the range list and compute the correct
> device-linear byte offset.
>
> Fixes: d5406bd458b0a ("dax: add fsdev.c driver for fs-dax on character dax")
> Signed-off-by: John Groves <john@xxxxxxxxxx>
> ---
Reviewed-by: Alison Schofield <alison.schofield@xxxxxxxxx>