What file is /dev/btrfs-control?
I can’t find any explanation about this file in the official documentation, I just know from the official documentation in devices.txt that this file is:
"234 = /dev/btrfs-control Btrfs control device".
It’s defined in
fs/btrfs/super.c in kernel source code, and used for various BtrFS-specific
ioctl() system calls.
Generally, unless you are developing the
libbtrfs library of the
btrfs-progs package, you don’t need to care about it.
But if you are curious, see
Documentation/btrfs-ioctl.rst in btrfs-progs package, read the detailed description of each BtrFS ioctl, and see which ones have the
ioctl fd specified as "file descriptor of the control device".
Alternatively, you can look at the
btrfs_control_ioctl function in the kernel source code, which implements the ioctls accessible through the control device. At the time of this writing, there are four of them: