Re: [PATCH v1 07/14] cxl/mem: Drop misaligned DCD extent groups

From: Alison Schofield

Date: Mon Nov 30 2026 - 14:58:54 EST


On Thu, Nov 05, 2026 at 08:02:31AM +0900, Anisa Su wrote:
> From: Ira Weiny <iweiny@xxxxxxxxxx>
>
> Add an alignment gate, cxl_validate_group(), that cxl_add_pending() runs
> before realizing a tag group: every extent in the group must have its
> start_dpa and length aligned to the dax region's mapping granularity.
> A misaligned extent makes the resulting dax device unusable, so drop
> the whole group rather than accept a partial allocation that would
> surface a broken dax_resource.
>
> Based on patches by John Groves.

With one tiny cleanup below,

Reviewed-by: Alison Schofield <alison.schofield@xxxxxxxxx>


>
> Signed-off-by: Ira Weiny <iweiny@xxxxxxxxxx>
> Co-developed-by: John Groves <John@xxxxxxxxxx>
> Signed-off-by: John Groves <John@xxxxxxxxxx>
> Co-developed-by: Anisa Su <anisa.su@xxxxxxxxxxx>
> Signed-off-by: Anisa Su <anisa.su@xxxxxxxxxxx>
> Tested-by: Wonjae Lee <wj28.lee@xxxxxxxxxxx>
> Tested-by: Junhee Park <jh9934.park@xxxxxxxxxxx>
> Tested-by: Heesoo Kim <habil.kim@xxxxxxxxxxx>
> ---
> drivers/cxl/core/mbox.c | 46 +++++++++++++++++++++++++++++++++++++++++

snip

> @@ -1395,6 +1397,19 @@ static int stage_pending_extent(struct list_head *pending,
> return 0;
> }
>
> +/*
> + * Extents need to be aligned to dax region's mapping granularity.
> + * Use PMD_SIZE, since cxl_dax_region_probe() calls alloc_dax_region with

s/alloc_dax_region with/alloc_dax_region()