dmmp_...mpath(3)

πŸ“¦
version 0.15.1 Β· 3 versions
, in arch rolling, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– dmmp_flush_mpath β€” flush that multipath device map bestie πŸ’–

okay so this is part of the Device Mapper Multipath API aka the libdmmp manual, and we are talking about dmmp_flush_mpath today. it's giving cleanup era. ✨


🌸 NAME 🌸

dmmp_flush_mpath β€” Flush specified multipath device map if unused.

like, if nobody's using it, we're clearing it out. no cap. πŸ’…


✨ SYNOPSIS ✨

int dmmp_flush_mpath (struct dmmp_context *ctx, const char *mpath_name);

two args, one int coming back at you. iconic. πŸŽ€


🫢 ARGUMENTS 🫢

  • ctx β€” Pointer of 'struct dmmp_context'. and listen, if this pointer is NULL, your program will be terminated by assert. not a vibe. not a drill. do not pass NULL here bestie, seriously. 😭
  • mpath_name β€” const char *. The name of multipath device map. just the name, that's it, that's the whole thing. πŸ¦‹

πŸ’« DESCRIPTION πŸ’«

Flush a multipath device map specified as parameter, if unused.

so like β€” you hand it a multipath device map, and if it's just sitting there unused, it gets flushed. that's the whole move. the "if unused" part is doing a LOT of heavy lifting there so don't forget it. 🌸


πŸ”₯ RETURN πŸ”₯

int. and the valid error codes are, in no particular order because they're all equally important:

  • DMMP_OK πŸ‘‘ (the slay outcome)
  • DMMP_ERR_BUG πŸ’€
  • DMMP_ERR_NO_MEMORY 😭
  • DMMP_ERR_NO_DAEMON πŸ™ˆ
  • DMMP_ERR_MPATH_BUSY (she's occupied, come back later)
  • DMMP_ERR_MPATH_NOT_FOUND πŸ•΅οΈ
  • DMMP_ERR_INVALID_ARGUMENT βœ‹
  • DMMP_ERR_PERMISSION_DENY 🚫

and the error number could be converted to string by dmmp_strerror. so if you get a number and you're like "what does this MEAN", hit up dmmp_strerror and she'll translate. iykyk. ✨


fr fr: check your return value. the number is not the message, dmmp_strerror is the message. don't skip that step. πŸ’–

and that's the page babes β€” this was dmmp_flush_mpath from the libdmmp manual (the dmmp_...mpath(3) one, you know the one), dated June 2025. go forth and flush responsibly. mwah. πŸ’…πŸŽ€πŸ¦‹