nilfs_ioctl_set_suinfo(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ nilfs_ioctl_set_suinfo(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸŽ€ β€” this one's a little ioctl that goes and rewrites your segment usage info, and honestly she's giving very niche-but-important energy. let's get into it πŸ’…


🌸 NAME 🌸

nilfs_ioctl_set_suinfo β€” set segment usage info ✨

like, she literally sets the segment usage info. that's the whole vibe. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

int nilfs_ioctl_set_suinfo (struct inode *inode , struct file *filp ,
       unsigned int cmd , void __user *argp );

πŸ’– ARGUMENTS πŸ’–

  • inode β€” the inode object, obviously. main character of the inode world πŸ‘‘
  • filp β€” the file object. yes it's a file, yes it shows up, yes it matters 🫢
  • cmd β€” the ioctl's request code. this is the "what do you actually want from me" parameter πŸ’«
  • argp β€” a pointer onto the argument coming from userspace. very "handing you a note from the other side" of her 🧚

⭐ DESCRIPTION ⭐

So here's the tea πŸ“: this function expects an array of nilfs_suinfo_update structures encapsulated in nilfs_argv, and then it goes ahead and updates the segment usage info according to the flags in nilfs_suinfo_update. literally that's it, that's the whole job β€” takes your array, reads your flags, updates the suinfo. slay πŸ”₯


πŸ’œ RETURN πŸ’œ

Returns 0 on success ✨ β€” or one of these negative error codes if things go sideways, and ngl some of these are giving "uh oh" 😭:

  • -EEXIST β€” Block conflict detected. like, the block was already taken, awkward πŸ™ˆ
  • -EFAULT β€” Error copying input data. the copy just did not happen, bestie πŸ’€
  • -EINVAL β€” Invalid values in input (segment number, flags or nblocks). one of those three was not it.
  • -EIO β€” I/O error. classic.
  • -ENOMEM β€” Insufficient memory available. she's hungry and there's no RAM snacks πŸ“
  • -EPERM β€” Not enough permissions. you don't have the keys to this party πŸ”‘
fr fr, all of these are negative codes β€” do not be out here treating them as positive vibes.

🌈 SEE ALSO 🌈

okay this list is lowkey iconic, it's the whole nilfs2 ioctl squad 🫢 β€” from the kernel file ./fs/nilfs2/ioctl.c:


and that's the page, bestie πŸ’… signed, sealed, delivered from ./fs/nilfs2, dated October 2026, and yeah β€” she's still nilfs_ioctl_set_suinfo(9) in case you forgot. iykyk πŸ¦‹βœ¨

πŸ“¦ where this page comes from