Whamcloud - gitweb
LU-17710 llite: protect parallel accesses to lli_*id
OSC obtains process uid/gid/jobid from the ll_inode_info. This can be
racy if several processes access the same file. This can lead to
corrupted or incoherent set of values.
This patch replaced the fields lli_jobid/lli_uid/lli_gid by a common
"struct job_info lli_jobinfo" field.
struct job_info {
char ji_jobid[LUSTRE_JOBID_SIZE];
__u32 ji_uid;
__u32 ji_gid;
};
The accesses are protected by a seqlock (lli_jobinfo_seqlock).
Additionally, this saves and restores process uid/gid values for
readahead works (cra_jobid is replaced by cra_jobinfo).
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: Idf01c1e4b533aea405c3a4439c0df0fcfc4dea56
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54727
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Thomas Bertschinger <bertschinger@lanl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 files changed: