nvm_addr - Addressing¶
nvm_addr¶
-
struct
nvm_addr
¶ Encapsulation of physical/hierarchical/geometric addressing in generic format.
Although the user need not worry about device specific address formats the user has to know and respect addressing within device specific geometric boundaries.
For that purpose one can use the
struct nvm_geo
of anstruct nvm_dev
to obtain device specific geometries.Public Members
-
uint64_t
sec
¶ Sector address.
-
uint64_t
pg
¶ Page address.
-
uint64_t
pl
¶ Plane address.
-
uint64_t
blk
¶ Block address.
-
uint64_t
lun
¶ LUN address.
-
uint64_t
ch
¶ Channel address.
-
uint64_t
sectr
¶ Logical Sector in Chunk.
-
uint64_t
chunk
¶ Chunk in PU.
-
uint64_t
punit
¶ Parallel Unit (PU) in PUG.
-
uint64_t
pugrp
¶ Parallel Unit Group (PUG)
-
uint64_t
ppa
¶ Address as raw value.
-
uint64_t
val
¶ Address as raw value.
-
uint64_t
nvm_addr_check¶
nvm_addr_dev2gen¶
nvm_addr_dev2off¶
-
uint64_t
nvm_addr_dev2off
(struct nvm_dev * dev, uint64_t addr)¶ Converts an address, in device-format, to Linux Block Device offset.
- Note
- This is a helper for function for the LBD backend, as a library user you will most likely not have a use for it
- Return
- Physical address on lba-offset-format
- Parameters
dev
: Device handle obtained withnvm_dev_open
addr
: The physical address on device-format to convert
nvm_addr_gen2dev¶
nvm_addr_gen2lpo¶
-
uint64_t
nvm_addr_gen2lpo
(struct nvm_dev * dev, struct nvm_addr addr)¶ Compute log-page-offset (lpo) in the NVMe chunk-information get-log-page.
That is, the location of the chunk-descriptor in the log-page, for the chunk at the given address in generic-format
- Note
- This is a helper for function for
nvm_cmd_rprt
, as a library user you will most likely not have a use for it - Return
- the log page offset (lpo) for the given addr
nvm_addr_gen2off¶
-
uint64_t
nvm_addr_gen2off
(struct nvm_dev * dev, struct nvm_addr addr)¶ Converts an address, in generic-format, to Linux Block Device offset.
- Note
- This is a helper for function for the LBD backend, as a library user you will most likely not have a use for it
- Return
- LBD offset
- Parameters
dev
: Device handle obtained withnvm_dev_open
addr
: The address, in generic-format, to convert
nvm_addr_lpo2gen¶
nvm_addr_off2dev¶
-
uint64_t
nvm_addr_off2dev
(struct nvm_dev * dev, uint64_t addr)¶ Converts a Linux Block Device offset to an address in device-format.
- Note
- This is a helper for function for the LBD backend, as a library user you will most likely not have a use for it
- Return
- Physical address on lba-offset-format
- Parameters
dev
: Device handle obtained withnvm_dev_open
addr
: The physical address on device-format to convert
nvm_addr_off2gen¶
-
struct nvm_addr
nvm_addr_off2gen
(struct nvm_dev * dev, uint64_t off)¶ Converts a Linux Block Device offset to an address in generic-format.
- Note
- This is a helper for function for the LBD backend, as a library user you will most likely not have a use for it
- Return
- Address in generic-format
- Parameters
dev
: Device handle obtained withnvm_dev_open
off
: LBD offset