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