PROTOCOLS
Admin
Defined in fuchsia.fs/admin.fidl
Administration functionality for filesystems.
GetRoot
Opens the given handle to the root directory of the filesystem. If the open fails, the handle will be closed with an epitaph indicating what went wrong.
Request
Name | Type |
---|---|
dir |
request<fuchsia.io/Directory>
|
Shutdown
Shuts down the filesystem. Once the filesystem recieves the shutdown request, it will complete any active requests before terminating, but will not respond to new requests. This call blocks until all open connections to the filesystem are terminated and any underlying block devices or other owned channels are released, then it responds to this request and closes this channel.
Request
Name | Type |
---|
Response
Name | Type |
---|
Query
Defined in fuchsia.fs/query.fidl
Query
exposes objective filesystem information independent of specific
files and directories.
GetInfo
Queries the filesystem.
query
specifies the fields inFilesystemInfo
that the caller is interested in.
info
see FilesystemInfo for details on the fields.
Request
Name | Type |
---|---|
query |
FilesystemInfoQuery
|
Response
Name | Type |
---|---|
result |
Query_GetInfo_Result
|
IsNodeInFilesystem
Checks if a node is associated with this filesystem, given some token representing a connection to that node.
Request
Name | Type |
---|---|
token |
handle<event>
|
Response
Name | Type |
---|---|
is_in_filesystem |
bool
|
STRUCTS
Query_GetInfo_Response
Defined in fuchsia.fs/query.fidl
Name | Type | Description | Default |
---|---|---|---|
info |
FilesystemInfo
|
No default |
ENUMS
FsType
Type: uint32
Defined in fuchsia.fs/query.fidl
The type of the filesystem.
This enum should be flexible, to accommodate future additions.
Name | Value | Description |
---|---|---|
BLOBFS |
2657701153 |
|
FACTORYFS |
510217505 |
|
FATFS |
3463007521 |
|
MINFS |
1852394785 |
|
MEMFS |
1047088417 |
TABLES
FilesystemInfo
Defined in fuchsia.fs/query.fidl
Information about a filesystem.
If a particular field is not applicable or not supported, implementations should leave it absent.
Ordinal | Name | Type | Description |
---|---|---|---|
1 | total_bytes |
uint64
|
The number of data bytes which may be stored in the filesystem. |
2 | used_bytes |
uint64
|
The number of data bytes which are in use by the filesystem. Note that this value may change in the mean time. |
3 | total_nodes |
uint64
|
The number of nodes which may be stored in the filesystem. |
4 | used_nodes |
uint64
|
The number of nodes used by the filesystem. Note that this value may change in the mean time. |
5 | free_shared_pool_bytes |
uint64
|
The amount of space which may be allocated from the underlying volume manager. Note that this value may change in the mean time. |
6 | fs_id |
handle<event>
|
A globally unique identifier for this filesystem instance. |
7 | block_size |
uint32
|
The size of a single filesystem block. |
8 | max_node_name_size |
uint32
|
The maximum length of a filesystem name. |
9 | fs_type |
FsType
|
A unique identifier for the type of the underlying filesystem. |
10 | name |
string[32]
|
The name of the filesystem. |
11 | device_path |
fuchsia.io2/Path
|
Path to the device backing this filesystem. |
UNIONS
Query_GetInfo_Result
Defined in fuchsia.fs/query.fidl
Name | Type | Description |
---|---|---|
response |
Query_GetInfo_Response
|
|
err |
zx/status
|
BITS
FilesystemInfoQuery
Type: uint64
Defined in fuchsia.fs/query.fidl
When calling Query.GetInfo, set the corresponding bit to one to query a particular field. The elements here correspond one-to-one with FilesystemInfo.
Name | Value | Description |
---|---|---|
TOTAL_BYTES | 1 | Requests FilesystemInfoQuery.total_bytes. |
USED_BYTES | 2 | Requests FilesystemInfoQuery.used_bytes. |
TOTAL_NODES | 4 | Requests FilesystemInfoQuery.total_nodes. |
USED_NODES | 8 | Requests FilesystemInfoQuery.used_nodes. |
FREE_SHARED_POOL_BYTES | 16 | |
FS_ID | 32 | Requests FilesystemInfoQuery.fs_id. |
BLOCK_SIZE | 64 | Requests FilesystemInfoQuery.block_size. |
MAX_NODE_NAME_SIZE | 128 | Requests FilesystemInfoQuery.max_node_name_size. |
FS_TYPE | 256 | Requests FilesystemInfoQuery.fs_type. |
NAME | 512 | Requests FilesystemInfoQuery.name. |
DEVICE_PATH | 1024 | Requests FilesystemInfoQuery.device_path. |
CONSTANTS
Name | Value | Type | Description |
---|---|---|---|
MAX_FS_NAME_LENGTH |
32
|
uint64 |
The maximum length of the name of a filesystem. |