NVME_GET_FEATURES_LBA_RANGE(2)

πŸ’– nvme_get_features_lba_range πŸ’–

okay bestie, so this one lives in the libnvme API manual, and honestly? It's giving legacy. Let's get into it πŸŽ€


✨ NAME ✨

nvme_get_features_lba_range β€” grab the LBA range feature, that's the whole job πŸ’…


✨ SYNOPSIS ✨

int nvme_get_features_lba_range (int fd , enum nvme_get_features_sel sel
, struct nvme_lba_range_type *data , __u32 *result );

like yes she's a function, yes she takes four things, yes she's lowkey deprecated (we'll get there πŸ™ˆ)


🌸 ARGUMENTS 🌸

  • fd β€” the file descriptor of your nvme device. that's your whole entire connection to the drive, do not lose her 🫢
  • sel β€” tells it which type of attribute to return. options live in enum nvme_get_features_sel, go look πŸ‘€
  • data β€” the user address of the feature data, if applicable. like, only if it applies, bestie, no pressure ✨
  • result β€” the command completion result from CQE dword0. that's where the tea comes back to you πŸ“

πŸ’€ DESCRIPTION πŸ’€

Deprecated: doesn't support specifying a NSID. Use nvme_get_features_lba_range2 instead.

not me having to tell you this 😭 she's deprecated, periodt. The one thing she cannot do β€” literally cannot β€” is let you specify an NSID. So if that's what you need (and it probably is), go use nvme_get_features_lba_range2 instead. She ate, but her time has passed πŸ‘‘


⭐ RETURN ⭐

You get back the nvme command status if a response was received β€” peek at enum nvme_status_field for the deets. If not? You get -1, with errno set otherwise. So check that errno, girlie, she's trying to tell you something πŸ’œ


that's the whole page, no skips, no crumbs left behind ✨

cute lil sign-off time: this gem comes from the libnvme API manual, dated July 2026. mwah πŸ’‹

πŸ“¦ where this page comes from