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

nvme create-ns input of --nsze adn --ncap in standard SI units #1747

Closed
jmhands opened this issue Dec 26, 2022 · 2 comments
Closed

nvme create-ns input of --nsze adn --ncap in standard SI units #1747

jmhands opened this issue Dec 26, 2022 · 2 comments

Comments

@jmhands
Copy link

jmhands commented Dec 26, 2022

accept SI units in --nsze and --ncap for nvme create-ns

  [  --nsze=<IONUM>, -s <IONUM> ]       --- size of ns (NSZE)
  [  --ncap=<IONUM>, -c <IONUM> ]       --- capacity of ns (NCAP)

example current command
nvme create-ns /dev/nvme0 –nsze 11995709440 –ncap 1199570940 –flbas 0 –dps 0 –nmic 0

proposed command
nvme create-ns /dev/nvme0 –nsze 6.14T –ncap 6.14T –flbas 0 –dps 0 –nmic 0

@ikegami-t
Copy link
Contributor

ikegami-t commented Dec 28, 2022

FYI: Just confirmed as currenty the binaly units 6Ti can be used as below but not SI units then the value is just parsed to 6,597,069,766,656 (= 6 x 1,024 x 1,024 x 1,024 x 1,024) as not divided by the LBA size also.

nvme create-ns /dev/nvme0 -nsze 6Ti -ncap 1199570940 -flbas 0 -dps 0 -nmic 0

Note: 6T is also can be used instead but the prased value is same with 6Ti. Also 6.14Ti decimal value using . is not parsed correctly as parsed to 0.

ikegami-t added a commit to ikegami-t/nvme-cli that referenced this issue Jan 3, 2023
… SI units

This is proposed by the issue linux-nvme#1747. The value suffixed SI is divided by the
namespace LBA size to set as NSZE and NCAP. If the value not suffixed it is set
as same with the nsze and ncap options.
  Note: The existing nsze/ncap arguments follow the specification defined units.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
@igaw
Copy link
Collaborator

igaw commented Jan 3, 2023

The change is merged.

@igaw igaw closed this as completed Jan 3, 2023
lgdacunh pushed a commit to solidigm/nvme-cli that referenced this issue Nov 10, 2023
… SI units

This is proposed by the issue linux-nvme#1747. The value suffixed SI is divided by the
namespace LBA size to set as NSZE and NCAP. If the value not suffixed it is set
as same with the nsze and ncap options.
  Note: The existing nsze/ncap arguments follow the specification defined units.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants