DISORDERFS(1)

πŸ“¦
version 0.7.0 Β· 2 versions
, in arch rolling, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ DISORDERFS(1) ✨

okay bestie, sit down, hydrate, and let me tell you about disorderfs β€” a FUSE filesystem that is literally chaos incarnate on purpose. πŸ’…


πŸŽ€ NAME πŸŽ€

disorderfs β€” a FUSE filesystem that introduces non-determinism πŸ’€βœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

disorderfs [OPTIONS...] ROOTDIR MOUNTPOINT

🌸 DESCRIPTION 🌸

So like, disorderfs is an overlay FUSE filesystem that injects non-determinism into filesystem metadata. For example? It can randomize the order in which directory entries are read. And why would you want that, you ask? Because it's iconic for detecting non-determinism in your build process, that's why. πŸ”₯

ROOTDIR is the path to the underlying directory that's getting mirrored, and MOUNTPOINT is where the overlay gets mounted. That's it, that's the whole vibe. 🫢


πŸ’– OPTIONS πŸ’–

go check fusermount(1), mount.fuse(8), and mount(8) for the full list of options, bestie β€” they've got the generic stuff covered. πŸ‘‘

But the options that are special to disorderfs:

  • --multi-user=yes|no β€” whether or not to let other users access the overlay mount (default: no). When you turn this on, disorderfs accesses the underlying file with the same credentials as the process accessing the overlaid file β€” like, the user ID, group ID, and supplemental group list. πŸͺͺ This is not the same as FUSE's allow_other option, ok? allow_other lets other users in, sure, but it makes disorderfs access the underlying filesystem using the credentials of whoever ran disorderfs, which is usually not what you want. πŸ’€
--multi-user=yes requires disorderfs to run as root. no cap.
  • --shuffle-dirents=yes|no β€” whether or not to randomly shuffle directory entries (default: no). The entries get shuffled every single time the directory is read, so repeated reads of the same directory will probably return different results. it's giving unpredictable on purpose. 🎲
  • --reverse-dirents=yes|no β€” whether or not to return directory entries in reverse order (default: yes). yeah, the default is yes, don't @ me. πŸ™ƒ
  • --sort-dirents=yes|no β€” whether or not to return directory entries in sorted order (default: no).
heads up: you need to explicitly override the default with --reverse-dirents=no to actually get results in the expected order. otherwise you're gonna be sitting there like 😭 wondering why everything's backwards.
  • --pad-blocks=N β€” adds N to the st_blocks field in struct stat(2) (default: 1). just padding, bestie. 🧚
  • --share-locks=yes|no β€” whether or not to share locks between disorderfs and the underlying filesystem (default: no). When this is enabled, locks created on the underlying filesystem are visible within disorderfs, and vice-versa. When it's disabled, locks still work fine within disorderfs β€” but if one process hits the underlying filesystem directly while another goes through disorderfs, they won't see each other's locks. πŸ™ˆ
Lock sharing is currently buggy, so it's disabled by default. 🚨
  • --help, -h β€” display help. ✨
  • --version, -V β€” display the version. ⭐

πŸ’€ BUGS πŸ’€

--share-locks=yes is currently buggy, fr fr: programs may report that a file is locked when it really isn't. 😭 not the false alarm.


🌈 EXAMPLE 🌈

If you're trying to test a Reproducible Builds issue, it is recommended you use --sort-dirents=yes instead of --shuffle-dirents=yes, so you can be sure that any difference between builds is deterministic in itself. like, you want your chaos to be consistent chaos. periodt. πŸ‘‘

For example:

$ mkdir rootdir sorted reversed
$ touch rootdir/a rootdir/b rootdir/c (1)

$ disorderfs --sort-dirents=yes --reverse-dirents=no rootdir sorted (2)
$ ls -f sorted
.  ..  a  b  c (3)

$ disorderfs --sort-dirents=yes --reverse-dirents=yes rootdir reversed (4)
$ ls -f reversed
c  b  a  ..  . (5)
  1. First, we create some example files πŸ“
  2. Mount rootdir in sorted mode...
  3. ... and the results are in sorted order. slay.
  4. We mount rootdir again, sorting the results in reversed order...
  5. ... and the directory contents are returned in reverse. πŸ”„
$ fusermount -u sorted $ fusermount -u reversed

πŸ‘‘ AUTHORS πŸ‘‘

Andrew Ayer <agwa@andrewayer.name> and Chris Lamb <lamby@debian.org> β€” absolute legends, we stan. πŸ’œ


and that's the whole thing, bestie!! this was disorderfs(1) from the 2018-04-10 era, and yeah the footer says the same thing twice but it's iconic so we're keeping the energy. go break some builds (deterministically). bye!! πŸ¦‹βœ¨πŸ’–