On Sat, Nov 7, 2026 at 2:57 AM Mikulas Patocka <[email protected]> wrote:
>
> "struct dm_arg _args" limits the number of arguments to 4, but there are
> 5 possible arguments that can be specified.
>
> Signed-off-by: Mikulas Patocka <[email protected]>
> Assisted-by: Claude:claude-opus-5
> Cc: [email protected]
> Fixes: 787a996cb251 ("dm thin: add error_if_no_space feature")
>
> ---
>  drivers/md/dm-thin.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-2.6/drivers/md/dm-thin.c
> ===================================================================
> --- linux-2.6.orig/drivers/md/dm-thin.c
> +++ linux-2.6/drivers/md/dm-thin.c
> @@ -3147,7 +3147,7 @@ static int parse_pool_features(struct dm
>         const char *arg_name;
>
>         static const struct dm_arg _args[] = {
> -               {0, 4, "Invalid number of pool feature arguments"},
> +               {0, 5, "Invalid number of pool feature arguments"},
>         };
>
>         /*
>
>

The ignore_discard and no_discard_passdown arguments are mutually
exclusive, so setting a thin-pool table with all 5 arguments is
redundant. Thus, dm-thin rejects tables with more than 4 feature
arguments.


Hank


Reply via email to