Skip to content
Snippets Groups Projects
Commit ad6ffc13 authored by Mikhail Pershin's avatar Mikhail Pershin
Browse files

b=9262

update local audit setting on client while set_audit()
parent 11cd2136
No related branches found
No related tags found
No related merge requests found
...@@ -40,17 +40,22 @@ int ll_set_audit(struct inode * inode, __u64 arg) ...@@ -40,17 +40,22 @@ int ll_set_audit(struct inode * inode, __u64 arg)
{ {
struct audit_attr_msg msg; struct audit_attr_msg msg;
struct obd_export * exp = ll_i2mdexp(inode); struct obd_export * exp = ll_i2mdexp(inode);
struct ll_sb_info * sbi = ll_s2sbi(inode->i_sb);
struct ll_inode_info *lli = ll_i2info(inode);
int rc; int rc;
msg.attr = arg; msg.attr = arg;
msg.id = ll_i2info(inode)->lli_id; msg.id = lli->lli_id;
//set audit on MDS (fs/dir/file) //set audit on MDS (fs/dir/file)
rc = obd_set_info(exp, 5, "audit", sizeof(msg), &msg); rc = obd_set_info(exp, 5, "audit", sizeof(msg), &msg);
//if fs audit is being set for fs then pass attr to all OSS //if fs audit is being set for fs then pass attr to all OSS
if (IS_AUDIT_OP(arg, AUDIT_FS)) { if (IS_AUDIT_OP(arg, AUDIT_FS)) {
sbi->ll_audit_mask = arg;
exp = ll_i2dtexp(inode); exp = ll_i2dtexp(inode);
rc = obd_set_info(exp, 5, "audit", sizeof(msg), &msg); rc = obd_set_info(exp, 5, "audit", sizeof(msg), &msg);
} else {
lli->lli_audit_mask = arg;
} }
return rc; return rc;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment