2021-11-30 15:00:48 +00:00
|
|
|
Custom ioctls
|
|
|
|
=============
|
|
|
|
|
2021-12-17 09:49:39 +00:00
|
|
|
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:
|
2021-11-30 15:00:48 +00:00
|
|
|
|
2023-04-26 23:48:47 +00:00
|
|
|
- reverse lookup, from file offset to inode, as command :command:`btrfs inspect-internal logical-resolve`
|
2021-11-30 15:00:48 +00:00
|
|
|
|
2023-04-26 23:48:47 +00:00
|
|
|
- resolve inode number to list of names, as command :command:`btrfs inspect-internal inode-resolve`
|
2021-11-30 15:00:48 +00:00
|
|
|
|
2021-12-17 09:49:39 +00:00
|
|
|
- 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
|
2022-12-14 01:56:16 +00:00
|
|
|
what to do with them, the ioctl is privileged as it has full access to all
|
|
|
|
filesystem metadata
|
2021-11-30 15:00:48 +00:00
|
|
|
|
2021-12-17 09:49:39 +00:00
|
|
|
- informative, about devices, space allocation or the whole filesystem, many of
|
2023-04-26 23:48:47 +00:00
|
|
|
which is also exported in :file:`/sys/fs/btrfs/`
|
2021-11-30 15:00:48 +00:00
|
|
|
|
2021-12-17 09:49:39 +00:00
|
|
|
- query/set a subset of features on a mounted filesystem
|
2023-05-31 23:14:47 +00:00
|
|
|
|
2024-07-17 07:20:13 +00:00
|
|
|
Programming documentation of the ioctls is in the manual page
|
2023-06-28 17:55:08 +00:00
|
|
|
:doc:`btrfs-ioctl`.
|