Custom ioctls 自定义 ioctls 

Filesystems are usually extended by custom ioctls beyond the standard system call interface to let user applications access the advanced features. They’re low level and the following list gives only an overview of the capabilities or a command if available:
通常通过自定义 ioctls 来扩展文件系统,超出标准系统调用接口,以便让用户应用程序访问高级功能。它们是低级的,以下列表仅提供功能概述或可用的命令:

  • reverse lookup, from file offset to inode, as command btrfs inspect-internal logical-resolve
    从文件偏移量到 inode 的反向查找,作为命令 btrfs inspect-internal logical-resolve

  • resolve inode number to list of names, as command btrfs inspect-internal inode-resolve
    将 inode 编号解析为名称列表,作为命令 btrfs inspect-internal inode-resolve

  • tree search, given a key range and tree id, lookup and return all b-tree items found in that range, basically all metadata at your hand but you need to know what to do with them, the ioctl is privileged as it has full access to all filesystem metadata
    树搜索,给定一个键范围和树 ID,查找并返回在该范围内找到的所有 b 树项,基本上是所有元数据都在手中,但您需要知道如何处理它们,ioctl 是特权的,因为它可以完全访问所有文件系统元数据

  • informative, about devices, space allocation or the whole filesystem, many of which is also exported in /sys/fs/btrfs/
    关于设备、空间分配或整个文件系统的信息,其中许多信息也在 /sys/fs/btrfs/ 中导出

  • query/set a subset of features on a mounted filesystem
    查询/设置已挂载文件系统上的一部分功能

Programming documentaion of the ioctls is in the manual page btrfs-ioctl(2).
ioctl 的编程文档在手册页 btrfs-ioctl(2) 中。