Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create-ns: align the namespaces to 1Mib boundaries when using SI suffixes #2095

Merged
merged 1 commit into from
Feb 5, 2024

Commits on Feb 5, 2024

  1. create-ns: align the namespaces to 1Mib boundaries when using SI suff…

    …ixes
    
    Some controllers refuse to create namespaces with a size not aligned to
    a 1 MiB boundary, this happens when using the -S and -C options.
    
    $ nvme create-ns /dev/nvme0 -S 80M -C 80M -f 0
    NVMe status: Invalid Field in Command: A reserved coded value or
    an unsupported value in a defined field(0x2)
    
    Fix this problem by modifying create_ns() parse_lba_num_si() to align
    the values to 1 MiB boundaries. If granularity is supported, we will
    use the specified values, if they are smaller than 1 MiB.
    
    Signed-off-by: Maurizio Lombardi <[email protected]>
    maurizio-lombardi committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    4285759 View commit details
    Browse the repository at this point in the history