MPATH_PERSISTENT_RESERVE_IN(3)

πŸ’… MPATH_PERSISTENT_RESERVE_IN(3)

okay so bestie, welcome to the Library Functions Manual entry for this absolute icon of a function 🫢 it lives in section 3 (that's the library-functions girlies) and it's the one that goes "hey DM device, gimme that PRIN response". no cap, let's get into it.


🌸 NAME 🌸

mpath_persistent_reserve_in β€” send a PRIN command to a DM device ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <mpath_persist.h>

int mpath_persistent_reserve_in(int fd, int rq_servact, struct prin_resp
*resp, int noisy, int verbose)

literally just five little arguments, she's lowkey low-maintenance πŸ’–


✨ DESCRIPTION ✨

so the function mpath_persistent_reserve_in() sends a PRIN command to the DM device and gets the response back. that's it, that's the vibe. it's giving "ask and you shall receive" πŸ‘‘

Parameters (the whole friend group):

  • fd β€” the file descriptor of a multipath device. this one's an input argument. 🧚
  • rq_servact β€” the PRIN command service action. also an input argument. πŸ’«
  • resp β€” the response from the PRIN service action. heads up bestie: the caller has to manage the memory allocation of this structure. that's on you, not her. πŸ™ˆ
  • noisy β€” turn on the debugging trace. input argument. 0 β†’ Disable, 1 β†’ Enable. it's literally a switch, iykyk πŸ”₯
  • verbose β€” set the verbosity level. input argument. value range: [0-3]. 0 β†’ Errors, 1 β†’ Warnings, 2 β†’ Info, 3 β†’ Debug. pick your fighter πŸ’€

🌈 RETURNS 🌈

okay this is the part where she tells you how it went. the way she has a whole range of moods:

  • MPATH_PR_SUCCESS β€” if the PR command was successful. slay, no notes πŸ’…
  • MPATH_PR_SYNTAX_ERROR β€” if there's a syntax error or an invalid parameter. typo era 😭
  • MPATH_PR_SENSE_NOT_READY β€” if the command fails with [sk,asc,ascq: 0x2,*,*].
  • MPATH_PR_SENSE_MEDIUM_ERROR β€” if the command fails with [sk,asc,ascq: 0x3,*,*].
  • MPATH_PR_SENSE_HARDWARE_ERROR β€” if the command fails with [sk,asc,ascq: 0x4,*,*].
  • MPATH_PR_SENSE_INVALID_OP β€” if the command fails with [sk,asc,ascq: 0x5,0x20,0x0]. specific queen 🎯
  • MPATH_PR_ILLEGAL_REQ β€” if the command fails with [sk,asc,ascq: 0x5,*,*].
  • MPATH_PR_SENSE_UNIT_ATTENTION β€” if the command fails with [sk,asc,ascq: 0x6,*,*]. pay attention to her fr fr πŸ‘€
  • MPATH_PR_SENSE_ABORTED_COMMAND β€” if the command fails with [sk,asc,ascq: 0xb,*,*].
  • MPATH_PR_NO_SENSE β€” if the command fails with [sk,asc,ascq: 0x0,*,*].
  • MPATH_PR_SENSE_MALFORMED β€” if the SCSI command is malformed. she's got opinions about your formatting πŸ’€
  • MPATH_PR_FILE_ERROR β€” if the command fails while accessing the file (device node) β€” problems like not found, you know the drill. πŸ“
  • MPATH_PR_DMMP_ERROR β€” if there's a Device Mapper related error (e.g. an error in getting dm info). device mapper said "not today" 😭
  • MPATH_PR_OTHER β€” if some other error/warning has occurred (e.g. a transport or driver error). the catch-all bestie, the miscellaneous main character 🌟
ngl, if you're matching on this, keep every constant exactly as spelled above β€” they're case-sensitive and MPATH_PR_... does not appreciate freestyling πŸ™…β€β™€οΈ

⭐ SEE ALSO ⭐

mpathpersist(8) β€” go read it, she's the older sister and she knows things πŸ’œ


πŸ‘‘ AUTHORS πŸ‘‘

multipath-tools was developed by Christophe Varoqui <christophe.varoqui@opensvc.com> and others. give credit where credit is due, periodt 🫢


and that's the page, bestie!! πŸŽ€ this lovely little writeup comes to you from Linux, dated 2024-02-09, and it's filed under MPATH_PERS..._RESERVE_IN(3) in the Library Functions Manual β€” go forth and PRIN responsibly βœ¨πŸ’–

πŸ“¦ where this page comes from
  • arch rolling: multipath-tools 0.15.1-1 Β· GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms