xref: /OK3568_Linux_fs/kernel/Documentation/filesystems/incfs.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1.. SPDX-License-Identifier: GPL-2.0
2
3=================================================
4incfs: A stacked incremental filesystem for Linux
5=================================================
6
7/sys/fs interface
8=================
9
10Please update Documentation/ABI/testing/sysfs-fs-incfs if you update this
11section.
12
13incfs creates the following files in /sys/fs.
14
15Features
16--------
17
18/sys/fs/incremental-fs/features/corefs
19  Reads 'supported'. Always present.
20
21/sys/fs/incremental-fs/features/v2
22  Reads 'supported'. Present if all v2 features of incfs are supported. These
23  are:
24    fs-verity support
25    inotify support
26    ioclts:
27      INCFS_IOC_SET_READ_TIMEOUTS
28      INCFS_IOC_GET_READ_TIMEOUTS
29      INCFS_IOC_GET_BLOCK_COUNT
30      INCFS_IOC_CREATE_MAPPED_FILE
31    .incomplete folder
32    .blocks_written pseudo file
33    report_uid mount option
34
35/sys/fs/incremental-fs/features/zstd
36  Reads 'supported'. Present if zstd compression is supported for data blocks.
37
38Optional per mount
39------------------
40
41For each incfs mount, the mount option sysfs_name=[name] creates a /sys/fs
42node called:
43
44/sys/fs/incremental-fs/instances/[name]
45
46This will contain the following files:
47
48/sys/fs/incremental-fs/instances/[name]/reads_delayed_min
49  Returns a count of the number of reads that were delayed as a result of the
50  per UID read timeouts min time setting.
51
52/sys/fs/incremental-fs/instances/[name]/reads_delayed_min_us
53  Returns total delay time for all files since first mount as a result of the
54  per UID read timeouts min time setting.
55
56/sys/fs/incremental-fs/instances/[name]/reads_delayed_pending
57  Returns a count of the number of reads that were delayed as a result of
58  waiting for a pending read.
59
60/sys/fs/incremental-fs/instances/[name]/reads_delayed_pending_us
61  Returns total delay time for all files since first mount as a result of
62  waiting for a pending read.
63
64/sys/fs/incremental-fs/instances/[name]/reads_failed_hash_verification
65  Returns number of reads that failed because of hash verification failures.
66
67/sys/fs/incremental-fs/instances/[name]/reads_failed_other
68  Returns number of reads that failed for reasons other than timing out or
69  hash failures.
70
71/sys/fs/incremental-fs/instances/[name]/reads_failed_timed_out
72  Returns number of reads that timed out.
73
74For reads_delayed_*** settings, note that a file can count for both
75reads_delayed_min and reads_delayed_pending if incfs first waits for a pending
76read then has to wait further for the min time. In that case, the time spent
77waiting is split between reads_delayed_pending_us, which is increased by the
78time spent waiting for the pending read, and reads_delayed_min_us, which is
79increased by the remainder of the time spent waiting.
80
81Reads that timed out are not added to the reads_delayed_pending or the
82reads_delayed_pending_us counters.
83