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