diff options
author | Paul Lawrence <paullawrence@google.com> | 2020-03-11 15:21:20 -0700 |
---|---|---|
committer | Paul Lawrence <paullawrence@google.com> | 2020-03-18 10:11:47 -0700 |
commit | cb94ec7a4ddaddd0df315a33f621f9101e7a2e6f (patch) | |
tree | 8b343415ecba806f460c811edcfc8622eb837530 /include/uapi | |
parent | 758073bec37716c23f4711fbed1bd4b9a21cbb96 (diff) |
ANDROID: Incremental fs: Add INCFS_IOC_PERMIT_FILL
Provide a securable way to open a file for filling
Test: incfs_test passes
Bug: 138149732
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Ib4b6fd839ad30ce08e31121d19e2c0d7066d302f
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/incrementalfs.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/include/uapi/linux/incrementalfs.h b/include/uapi/linux/incrementalfs.h index 2efc53f591ef..fd65f575cdf0 100644 --- a/include/uapi/linux/incrementalfs.h +++ b/include/uapi/linux/incrementalfs.h @@ -51,13 +51,23 @@ _IOR(INCFS_IOCTL_BASE_CODE, 31, struct incfs_get_file_sig_args) /* - * Fill in one or more data block + * Fill in one or more data block. This may only be called on a handle + * passed as a parameter to INCFS_IOC_PERMIT_FILLING * * Returns number of blocks filled in, or error if none were */ #define INCFS_IOC_FILL_BLOCKS \ _IOR(INCFS_IOCTL_BASE_CODE, 32, struct incfs_fill_blocks) +/* + * Permit INCFS_IOC_FILL_BLOCKS on the given file descriptor + * May only be called on .pending_reads file + * + * Returns 0 on success or error + */ +#define INCFS_IOC_PERMIT_FILL \ + _IOW(INCFS_IOCTL_BASE_CODE, 33, struct incfs_permit_fill) + enum incfs_compression_alg { COMPRESSION_NONE = 0, COMPRESSION_LZ4 = 1 @@ -139,6 +149,17 @@ struct incfs_fill_blocks { __aligned_u64 fill_blocks; }; +/* + * Permit INCFS_IOC_FILL_BLOCKS on the given file descriptor + * May only be called on .pending_reads file + * + * Argument for INCFS_IOC_PERMIT_FILL + */ +struct incfs_permit_fill { + /* File to permit fills on */ + __u32 file_descriptor; +}; + enum incfs_hash_tree_algorithm { INCFS_HASH_TREE_NONE = 0, INCFS_HASH_TREE_SHA256 = 1 |