parse_optional_arguments(9)
π parse_optional_arguments(9)
okay so this is a page from the Kernel API Manual β yes, the kernel, yes, it's a whole vibe π§β¨
β¨ NAME β¨
parse_optional_arguments β literally the function that parses the configuration string you passed in for optional arguments. that's it, that's the whole job π
πΈ SYNOPSIS πΈ
int parse_optional_arguments (struct dm_arg_set *arg_set , char
**error_ptr , struct device_config *config );
bestie it returns an int, it takes three things, and we're gonna go through all of them one by one π«Ά
π¦ ARGUMENTS π¦
arg_setβ the structure holding the arguments we're about to parse. it's giving "the container of the thing" πerror_ptrβ pointer to a buffer that's gonna hold the error string. if something goes sideways, this is where the receipts live πconfigβ pointer to the device configuration data that gets updated. main character energy, honestly π
π DESCRIPTION π
okay so here's the situation, and it's actually two situations depending on your version, periodt.
For V0/V1 configurations, there will only be one optional parameter; the thread configuration. the configuration string should contain one or more comma-separated specs of the form "typename=number", and the supported type names are "cpu", "ack", "bio", "bioRotationInterval", "logical", "physical", and "hash". so like, exactly those seven, no inventing your own β¨
For V2 configurations and beyond, there could be any number of arguments. they should contain one or more key/value pairs separated by a space. so it's giving "glow up, we're flexible now" π¦
ngl the two formats are different and that is not a typo β commas and = for the old ones, spaces and key/value pairs for the new ones. read the version, bestie π₯
π RETURN π
VDO_SUCCESS or error. that's the whole range of outcomes, no surprises, no cap π
π SEE ALSO π
- Kernel file
./drivers/md/dm-vdo/dm-vdo-target.c free_device_config(9)get_version_number(9)parse_bool(9)parse_memory(9)parse_slab_size(9)process_one_thread_config_spec(9)parse_one_thread_config_spec(9)parse_thread_config_string(9)process_one_key_value_pair(9)parse_one_key_value_pair(9)parse_key_value_pairs(9)handle_parse_error(9)parse_device_config(9)get_thread_id_for_phase(9)advance_phase(9)finish_operation_callback(9)decode_from_super_block(9)decode_vdo(9)pre_load_callback(9)get_bit_array_size(9)grow_bit_array(9)allocate_instance(9)check_may_grow_physical(9)grow_layout(9)validate_new_device_config(9)write_super_block_for_suspend(9)suspend_callback(9)was_new(9)requires_repair(9)get_load_type(9)load_callback(9)handle_load_error(9)write_super_block_for_resume(9)resume_callback(9)grow_logical_callback(9)handle_logical_growth_error(9)perform_grow_logical(9)copy_partition(9)grow_physical_callback(9)handle_physical_growth_error(9)perform_grow_physical(9)apply_new_vdo_configuration(9)
and that's the page!! π this icon came out of ./drivers/md/dm-vdo and it's dated October 2026 β go off, future kernel docs, we love to see it π§βπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms