dm-thin: fix parsing of feature arguments
Mikulas Patocka
maintainerPATCH 1/1 dm-thin: fix parsing of feature arguments
"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
Fixes 787a996cb251 ("dm thin: add error_if_no_space feature")
--- drivers/md/dm-thin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-thin.c +1 -1
@@ -3147,7 +3147,7 @@ static int parse_pool_features(struct dmconst 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" }, };/*
Quoted 20 lines · Mikulas Patocka
"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-5Fixes 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
===================================================================
drivers/md/dm-thin.c static int parse_pool_features(struct dm · line 3153
Quoted 8 lines
drivers/md/dm-thin.c +1
-1@@ -3147,7 +3147,7 @@ static int parse_pool_features(struct dmconst 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