libnvme(2)
π libnvme(2) β the API Manual bestie edition π
okay so you opened a man page from libnvme and it's giving very specific, very niche, very iconic. we're talking the raw API layer here. sit down, grab a boba, let's go π§β¨
β¨ NAME β¨
enum nvme_id_ctrl_trattr β Tracking Attributes
likeβ¦ the tracking attributes, bestie. it's right there in the name. π
πΈ SYNOPSIS πΈ
enum nvme_id_ctrl_trattr {
NVME_CTRL_TRATTR_THMCS_SHIFT ,
NVME_CTRL_TRATTR_TUDCS_SHIFT ,
NVME_CTRL_TRATTR_MRTLL_SHIFT ,
NVME_CTRL_TRATTR_THMCS_MASK ,
NVME_CTRL_TRATTR_TUDCS_MASK ,
NVME_CTRL_TRATTR_MRTLL_MASK
};
no cap, that's the whole enum. six members, zero drama, all vibes. π¦
π Constants π
π the SHIFTs
NVME_CTRL_TRATTR_THMCS_SHIFTβ this is the shift amount you use to pull the Track Host Memory Changes Support out of thestruct nvme_id_ctrl.trattrfield. shifting is the whole move here, fr fr. π«ΆNVME_CTRL_TRATTR_TUDCS_SHIFTβ shift amount for getting the Track User Data Changes Support out of that samestruct nvme_id_ctrl.trattrfield. yes, same field, different little slice. it's giving "sharing is caring". πNVME_CTRL_TRATTR_MRTLL_SHIFTβ shift amount to grab the Memory Range Tracking Length Limit fromstruct nvme_id_ctrl.trattr. the limit!! the range!! the tracking!! π
π the MASKs
NVME_CTRL_TRATTR_THMCS_MASKβ a mask that gets you the Track Host Memory Changes Support from thestruct nvme_id_ctrl.trattrfield. mask + shift = the classic duo, they ate. βNVME_CTRL_TRATTR_TUDCS_MASKβ mask for pulling the Track User Data Changes Support out ofstruct nvme_id_ctrl.trattr. apply it, get the bits, main character energy. π₯NVME_CTRL_TRATTR_MRTLL_MASKβ the mask that gets you the Memory Range Tracking Length Limit fromstruct nvme_id_ctrl.trattr. last one, but definitely not least. π
vibe check: every single one of these constants is reading out of the exact same field β struct nvme_id_ctrl.trattr β just different slices of it. shifts move you there, masks isolate the bits. iykyk. π
and that's the whole page, bestie β you understood it, you slayed it, periodt. π
this little gem is from the libnvme API Manual, and it's dated July 2026 β page libnvme(2), section enum nvme_id_ctrl_trattr. obsessed with her honestly. πΈπ¦β¨
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms