retire_super(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ retire_super(9) πŸŽ€

okay bestie, welcome to retire_super β€” straight out of the Kernel API Manual, and honestly? it's giving "quietly shutting the door on a superblock so nobody else can walk in" ✨


✨ NAME ✨

retire_super β€” literally prevents a superblock from being reused πŸ’…


🌸 SYNOPSIS 🌸

void retire_super (struct super_block *sb );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • sb β€” the superblock you're retiring. that's it, that's the whole vibe 🫢

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea πŸ”₯ this function marks the superblock to be ignored in the superblock test, which prevents it from being reused for any new mounts. no cap, once it's retired, it's retired.

and if the superblock has a private bdi, it also unregisters it β€” but bestie, listen, it does not reduce the refcount of the superblock, and that's on purpose, to prevent potential races. the refcount is reduced by generic_shutdown_super instead. iykyk 😌

⚠️ super important: the function can not be called concurrently with generic_shutdown_super. like, do not do that. fr fr.

good news though β€” it is safe to call the function multiple times, and subsequent calls have no effect. so if you're paranoid and call it twice, it's fine, it's giving "no thoughts, head empty" πŸ’€

one more thing, the marker will affect the re-use only for block-device-based superblocks. other superblocks will still get marked if this function is used, but that will not affect their reusability. so like, marked β‰  locked, y'know? πŸ™ˆ


🌈 SEE ALSO 🌈

kernel file ./fs/super.c β€” plus the whole friend group πŸ‘‘


that's the whole page bestie, go forth and retire those superblocks responsibly πŸ§šπŸ’œ

mwah πŸ’‹ β€” this one lives in ./fs, dated October 2026, and you'll find it filed under retire_super(9) forever and ever πŸŽ€

πŸ“¦ where this page comes from