LIBNVMF_CONTEXT_SET_RECONNECT_POLICY-LIBNVME3(2)
π libnvmf_context_set_reconnect_policy β the one where you set the whole reconnect vibe in a single call
okay so bestie, welcome to the libnvme API manual β¨ this is page libnvmf_context_set_reconnect_policy(2), and it's genuinely one of those little convenience functions that lowkey saves your life. sit down, grab a π, let's go.
πΈ NAME πΈ
libnvmf_context_set_reconnect_policy β sets the reconnect policy for your context. that's it. that's the whole thing. and yet. π
β¨ SYNOPSIS β¨
int libnvmf_context_set_reconnect_policy (struct libnvmf_context *fctx ,
int ctrl_loss_tmo , int reconnect_delay , int fast_io_fail_tmo );
she takes four arguments and returns an int. iconic behavior honestly π«Ά
π ARGUMENTS π
fctxβ the Fabrics context. your main character. everything happens inside her πctrl_loss_tmoβ the controller loss timeout, in seconds. and here's the fun part: if you pass a negative value, it means retry indefinitely. no cap, she will just keep going forever πreconnect_delayβ the delay between reconnect attempts, in seconds. the little breather between tries πΈfast_io_fail_tmoβ the fast I/O fail timeout, in seconds. a negative value disables it. and β οΈ it must not exceedctrl_loss_tmoβ like, that's a hard rule, do not test her.
π¦ DESCRIPTION π¦
so this is a convenience setter for the three coupled reconnect policy parameters β one call, all three, slay β¨
here's the tea on the coupling, and it's important so listen up:
ctrl_loss_tmoandreconnect_delayare coupled. the kernel literally derives the maximum reconnect attempt count from their ratio. so like, they're a package deal, you can't just set one and ignore the other's energy πfast_io_fail_tmocontrols how quickly outstanding I/O gets failed while reconnection is in progress. so it's the "how fast do we give up on this I/O" dial π₯
and if you only need to change a subset of these, no worries bestie β the individual accessors are also available:
libnvmf_context_set_ctrl_loss_tmo_set_reconnect_delay_set_fast_io_fail_tmo
pick your fighter, use whichever fits the vibe check π
β RETURN β
0on success π- a negative error code otherwise π
ngl the whole thing is: three knobs, one function, don't letfast_io_fail_tmobe bigger thanctrl_loss_tmo, and negative numbers mean very different things depending on which argument you hand them to. read the arguments section again if you need to, i'll wait π§
and that's the page, bestie!! this gem is from the libnvme API manual, dated October 2026 β go forth and reconnect responsibly πππ
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms