Re: [PATCH] tmpfs: fix mount mpol nodelist parsing

From: Andi Kleen
Date: Tue Feb 21 2006 - 18:51:27 EST


On Wednesday 22 February 2006 00:49, Hugh Dickins wrote:
> I've been dissatisfied with the mpol_nodelist mount option which was
> added to tmpfs earlier in -rc. Replace it by mpol=policy:nodelist.
>
> And it was broken: a nodelist is a comma-separated list of numbers and
> ranges; the mount options are a comma-separated list of token=values.
> Whoops, blindly strsep'ing on commas doesn't work so well: since we've
> no numeric tokens, and unlikely to add them, use that to distinguish.
>
> Move the mpol= parsing to shmem_parse_mpol under CONFIG_NUMA, reject
> all its options as invalid if not NUMA. /proc shows MPOL_PREFERRED
> as "prefer", so use that name for the policy instead of "preferred".
>
> Enforce that mpol=default has no nodelist; that mpol=prefer has one
> node only; that mpol=bind has a nodelist; but let mpol=interleave use
> node_online_map if no nodelist given. Describe this in tmpfs.txt.

Looks good thanks. Best would be to get that patch into 2.6.16 so
we don't end up with an broken interface in the release.

>
> Signed-off-by: Hugh Dickins <hugh@xxxxxxxxxxx>
> Acked-by: Robin Holt <holt@xxxxxxx>
Acked-by: Andi Kleen <ak@xxxxxxx>

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/