-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ANDROID: Incremental fs: Add status to sysfs
Adding seven sysfs entries per mount: reads_failed_timed_out reads_failed_hash_verification reads_failed_other reads_delayed_pending reads_delayed_pending_us reads_delayed_min reads_delayed_min_us to allow for status monitoring from userland Change-Id: I50677511c2af4778ba0c574bb80323f31425b4d0 Test: incfs_test passes Bug: 160634343 Bug: 184291759 Signed-off-by: Paul Lawrence <paullawrence@google.com>
- Loading branch information
1 parent
3d471f0
commit 44ffa65
Showing
11 changed files
with
700 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
What: /sys/fs/incremental-fs/features/corefs | ||
Date: 2019 | ||
Contact: Paul Lawrence <paullawrence@google.com> | ||
Description: Reads 'supported'. Always present. | ||
|
||
What: /sys/fs/incremental-fs/features/v2 | ||
Date: April 2021 | ||
Contact: Paul Lawrence <paullawrence@google.com> | ||
Description: Reads 'supported'. Present if all v2 features of incfs are | ||
supported. | ||
|
||
What: /sys/fs/incremental-fs/features/zstd | ||
Date: April 2021 | ||
Contact: Paul Lawrence <paullawrence@google.com> | ||
Description: Reads 'supported'. Present if zstd compression is supported | ||
for data blocks. | ||
|
||
What: /sys/fs/incremental-fs/instances/[name] | ||
Date: April 2021 | ||
Contact: Paul Lawrence <paullawrence@google.com> | ||
Description: Folder created when incfs is mounted with the sysfs_name=[name] | ||
option. If this option is used, the following values are created | ||
in this folder. | ||
|
||
What: /sys/fs/incremental-fs/instances/[name]/reads_delayed_min | ||
Date: April 2021 | ||
Contact: Paul Lawrence <paullawrence@google.com> | ||
Description: Returns a count of the number of reads that were delayed as a | ||
result of the per UID read timeouts min time setting. | ||
|
||
What: /sys/fs/incremental-fs/instances/[name]/reads_delayed_min_us | ||
Date: April 2021 | ||
Contact: Paul Lawrence <paullawrence@google.com> | ||
Description: Returns total delay time for all files since first mount as a | ||
result of the per UID read timeouts min time setting. | ||
|
||
What: /sys/fs/incremental-fs/instances/[name]/reads_delayed_pending | ||
Date: April 2021 | ||
Contact: Paul Lawrence <paullawrence@google.com> | ||
Description: Returns a count of the number of reads that were delayed as a | ||
result of waiting for a pending read. | ||
|
||
What: /sys/fs/incremental-fs/instances/[name]/reads_delayed_pending_us | ||
Date: April 2021 | ||
Contact: Paul Lawrence <paullawrence@google.com> | ||
Description: Returns total delay time for all files since first mount as a | ||
result of waiting for a pending read. | ||
|
||
What: /sys/fs/incremental-fs/instances/[name]/reads_failed_hash_verification | ||
Date: April 2021 | ||
Contact: Paul Lawrence <paullawrence@google.com> | ||
Description: Returns number of reads that failed because of hash verification | ||
failures. | ||
|
||
What: /sys/fs/incremental-fs/instances/[name]/reads_failed_other | ||
Date: April 2021 | ||
Contact: Paul Lawrence <paullawrence@google.com> | ||
Description: Returns number of reads that failed for reasons other than | ||
timing out or hash failures. | ||
|
||
What: /sys/fs/incremental-fs/instances/[name]/reads_failed_timed_out | ||
Date: April 2021 | ||
Contact: Paul Lawrence <paullawrence@google.com> | ||
Description: Returns number of reads that timed out. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
.. SPDX-License-Identifier: GPL-2.0 | ||
================================================= | ||
incfs: A stacked incremental filesystem for Linux | ||
================================================= | ||
|
||
/sys/fs interface | ||
================= | ||
|
||
Please update Documentation/ABI/testing/sys-fs-incfs if you update this | ||
section. | ||
|
||
incfs creates the following files in /sys/fs. | ||
|
||
Features | ||
-------- | ||
|
||
/sys/fs/incremental-fs/features/corefs | ||
Reads 'supported'. Always present. | ||
|
||
/sys/fs/incremental-fs/features/v2 | ||
Reads 'supported'. Present if all v2 features of incfs are supported. These | ||
are: | ||
fs-verity support | ||
inotify support | ||
ioclts: | ||
INCFS_IOC_SET_READ_TIMEOUTS | ||
INCFS_IOC_GET_READ_TIMEOUTS | ||
INCFS_IOC_GET_BLOCK_COUNT | ||
INCFS_IOC_CREATE_MAPPED_FILE | ||
.incomplete folder | ||
.blocks_written pseudo file | ||
report_uid mount option | ||
|
||
/sys/fs/incremental-fs/features/zstd | ||
Reads 'supported'. Present if zstd compression is supported for data blocks. | ||
|
||
Optional per mount | ||
------------------ | ||
|
||
For each incfs mount, the mount option sysfs_name=[name] creates a /sys/fs | ||
node called: | ||
|
||
/sys/fs/incremental-fs/instances/[name] | ||
|
||
This will contain the following files: | ||
|
||
/sys/fs/incremental-fs/instances/[name]/reads_delayed_min | ||
Returns a count of the number of reads that were delayed as a result of the | ||
per UID read timeouts min time setting. | ||
|
||
/sys/fs/incremental-fs/instances/[name]/reads_delayed_min_us | ||
Returns total delay time for all files since first mount as a result of the | ||
per UID read timeouts min time setting. | ||
|
||
/sys/fs/incremental-fs/instances/[name]/reads_delayed_pending | ||
Returns a count of the number of reads that were delayed as a result of | ||
waiting for a pending read. | ||
|
||
/sys/fs/incremental-fs/instances/[name]/reads_delayed_pending_us | ||
Returns total delay time for all files since first mount as a result of | ||
waiting for a pending read. | ||
|
||
/sys/fs/incremental-fs/instances/[name]/reads_failed_hash_verification | ||
Returns number of reads that failed because of hash verification failures. | ||
|
||
/sys/fs/incremental-fs/instances/[name]/reads_failed_other | ||
Returns number of reads that failed for reasons other than timing out or | ||
hash failures. | ||
|
||
/sys/fs/incremental-fs/instances/[name]/reads_failed_timed_out | ||
Returns number of reads that timed out. | ||
|
||
For reads_delayed_*** settings, note that a file can count for both | ||
reads_delayed_min and reads_delayed_pending if incfs first waits for a pending | ||
read then has to wait further for the min time. In that case, the time spent | ||
waiting is split between reads_delayed_pending_us, which is increased by the | ||
time spent waiting for the pending read, and reads_delayed_min_us, which is | ||
increased by the remainder of the time spent waiting. | ||
|
||
Reads that timed out are not added to the reads_delayed_pending or the | ||
reads_delayed_pending_us counters. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.