• 1 Post
  • 91 Comments
Joined 3 years ago
cake
Cake day: August 6th, 2023

help-circle



  • The troubles between stage 2 and 6 are probably realizing dirs are not files, and seeing that device and driver files are different things from data files. Then stage 6 would be realizing that filesystems themselves just sit on device files. The directories and data files are in the device files. In truth, everything is a device file.

    But then, I propose a stage 7. Because when you trace it all back, with mounts pointing to device files sitting in mounted file systems, you see that /dev is a tempfs, mounted in a tempfs, in which device files are “mounted”. The fondamental root, /, is underneath the root filesystem a tempfs too. At boot, the kernel makes a tempfs, and later overlays the rootfs mounted from the /dev mounted in the root tempfs.
    Everything is a filesystem, ever,thing is mounted. The true files, device files, are mounted too. They are the mounting of a kernel module in the same way a directory - a filesystem - is a mounted kernel module.
    The Linux world is a ying and yang between dir structures and mounted kernel modules. In all of this, data files, the “true files”, don’t even show up. At the end, it’s just the kernel talking to itself.





  • btrfs’s handling makes sense. The kernel talks to the disk directly, the file is just a pointer for what range it uses, and a placeholder for the filesystem. Something like raid, balancing, cow, all won’t work because the kernel doesn’t even go through btrfs to change the swap"file".
    If you want a proper file as swapfile, with the corresponding overhead, you can make a regular file and mount it via loopback then use it as a swap device.




  • Or non bendy, like metal. Tube does a curve, straight thing won’t fit.
    But also this is likely made up. The pee tube does circular contractions just like your throat, moving stuff out very efficiently. Even something bendy shouldn’t go in more than you push it and immediately come back.