LLAPI_CREATE_VOLATILE_PARAM(3)

πŸ“¦ version 2.17.58, in ubuntu stonking

πŸ’– NAME πŸ’–

llapi_create_volatile_param β€” bestie, this is the Lustre API file management page, and it's giving "make a file that ghosts everyone" energy πŸ‘»βœ¨


🌸 SYNOPSIS 🌸

#include <lustre/lustreapi.h>

int llapi_create_volatile_param(const char *directory, int mdt_indx,
                                int open_flags, mode_t mode,
                                const struct llapi_stripe_param *stripe_param)

int llapi_create_volatile_idx(char *directory, int idx, int open_flags)

int llapi_create_volatile(char *directory, int mode)

✨ DESCRIPTION ✨

Okay so these three functions are the trio we're obsessed with. They make an anonymous, temporary, volatile file on a Lustre filesystem. The file they create? not visible with ls(1). Like, it literally will not show up. Not me making files nobody can see πŸ’…. And the second you close the file β€” or the process that owns it just... dies β€” the file is permanently removed from the filesystem. Gone. Poof. Periodt.

Lowkey cute fact: these functions also work on a non-Lustre filesystem too. But over there it's not the same vibe β€” the file gets created and then unlinked, so all you've got left is the file descriptor to access it with. And why is that not strictly equivalent? Because there's a small window during which the file is visible to users (as long as they have access to the directory). So not the stealth mode you get on Lustre, iykyk πŸ™ˆ.

  • The directory parameter tells you where to create the file on the Lustre filesystem.
  • mdt_idx is the MDT index onto which to create the file. Wanna use a default MDT? Set mdt_idx to -1. Easy.
  • open_flags and mode are the same as open(2) β€” no new rules, same as always.
  • stripe_param describes the striping information. If it's NULL, then the default for the directory is used. Simple as that πŸŽ€.

🫢 RETURN VALUE 🫢

llapi_create_volatile_param, llapi_create_volatile_idx and llapi_create_volatile all return a file descriptor on success β€” slay. And on failure? All three return a negative errno. Every single one of them.


😭 ERRORS 😭

The negative errno can be (but is not limited to):

  • -EINVAL β€” an invalid value was passed. Something in there was not it, bestie.
  • -ENOMEM β€” not enough memory to allocate a resource. The machine is out here struggling, fr fr.

πŸ‘‘ AUTHORS πŸ‘‘

Frank Zago for Cray Inc. β€” iconic work, no cap 🫑


🌈 AVAILABILITY 🌈

llapi_create_volatile_param(), llapi_create_volatile_idx() and llapi_create_volatile() are part of the lustre(7) user application interface library since release 2.4.0. So if you're on anything older, that's a vibe check fail, sorry 🧚


⭐ SEE ALSO ⭐


And that's the whole page, bestie! πŸ’œ This was the Lustre Library Functions manual β€” aka LLAPI_CREATE_VOLATILE_PARAM(3) β€” brought to you by the Lustre User API, dated 2024-08-23. Go forth and make invisible files, you main character πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from