ANDROID: Incremental fs: Add uid to INCFS_IOC_GET_LAST_READ_ERROR
Bug: 186796876 Test: incfs_test passes Signed-off-by: Paul Lawrence <paullawrence@google.com> Change-Id: I552cae5e87b004202364ba5c9c5f9febb9e106f2
This commit is contained in:
parent
25c3b9e0fe
commit
b6e60f0673
4 changed files with 8 additions and 1 deletions
|
|
@ -1274,6 +1274,7 @@ static int incfs_update_sysfs_error(struct file *file, int index, int result,
|
|||
mi->mi_le_time_us = ktime_to_us(ktime_get());
|
||||
mi->mi_le_page = index;
|
||||
mi->mi_le_errno = result;
|
||||
mi->mi_le_uid = current_uid().val;
|
||||
mutex_unlock(&mi->mi_le_mutex);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ struct mount_info {
|
|||
u64 mi_le_time_us;
|
||||
u32 mi_le_page;
|
||||
u32 mi_le_errno;
|
||||
uid_t mi_le_uid;
|
||||
|
||||
/* Number of reads timed out */
|
||||
u32 mi_reads_failed_timed_out;
|
||||
|
|
|
|||
|
|
@ -1005,6 +1005,7 @@ static long ioctl_get_last_read_error(struct mount_info *mi, void __user *arg)
|
|||
args.time_us_out = mi->mi_le_time_us;
|
||||
args.page_out = mi->mi_le_page;
|
||||
args.errno_out = mi->mi_le_errno;
|
||||
args.uid_out = mi->mi_le_uid;
|
||||
|
||||
mutex_unlock(&mi->mi_le_mutex);
|
||||
if (copy_to_user(args_usr_ptr, &args, sizeof(args)) > 0)
|
||||
|
|
|
|||
|
|
@ -580,7 +580,11 @@ struct incfs_get_last_read_error_args {
|
|||
/* errno of last read error */
|
||||
__u32 errno_out;
|
||||
|
||||
__u64 reserved;
|
||||
/* uid of last read error */
|
||||
__u32 uid_out;
|
||||
|
||||
__u32 reserved1;
|
||||
__u64 reserved2;
|
||||
};
|
||||
|
||||
#endif /* _UAPI_LINUX_INCREMENTALFS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue