Lines Matching defs:attrs
84 static int orangefs_inode_flags(struct ORANGEFS_sys_attr_s *attrs)
87 if (attrs->flags & ORANGEFS_IMMUTABLE_FL)
91 if (attrs->flags & ORANGEFS_APPEND_FL)
95 if (attrs->flags & ORANGEFS_NOATIME_FL)
102 static int orangefs_inode_perms(struct ORANGEFS_sys_attr_s *attrs)
106 if (attrs->perms & ORANGEFS_O_EXECUTE)
108 if (attrs->perms & ORANGEFS_O_WRITE)
110 if (attrs->perms & ORANGEFS_O_READ)
113 if (attrs->perms & ORANGEFS_G_EXECUTE)
115 if (attrs->perms & ORANGEFS_G_WRITE)
117 if (attrs->perms & ORANGEFS_G_READ)
120 if (attrs->perms & ORANGEFS_U_EXECUTE)
122 if (attrs->perms & ORANGEFS_U_WRITE)
124 if (attrs->perms & ORANGEFS_U_READ)
127 if (attrs->perms & ORANGEFS_G_SGID)
129 if (attrs->perms & ORANGEFS_U_SUID)
140 struct ORANGEFS_sys_attr_s *attrs)
143 attrs->mask = 0;
145 attrs->owner = from_kuid(&init_user_ns, inode->i_uid);
146 attrs->mask |= ORANGEFS_ATTR_SYS_UID;
147 gossip_debug(GOSSIP_UTILS_DEBUG, "(UID) %d\n", attrs->owner);
150 attrs->group = from_kgid(&init_user_ns, inode->i_gid);
151 attrs->mask |= ORANGEFS_ATTR_SYS_GID;
152 gossip_debug(GOSSIP_UTILS_DEBUG, "(GID) %d\n", attrs->group);
156 attrs->mask |= ORANGEFS_ATTR_SYS_ATIME;
158 attrs->atime = (time64_t) inode_get_atime_sec(inode);
159 attrs->mask |= ORANGEFS_ATTR_SYS_ATIME_SET;
163 attrs->mask |= ORANGEFS_ATTR_SYS_MTIME;
165 attrs->mtime = (time64_t) inode_get_mtime_sec(inode);
166 attrs->mask |= ORANGEFS_ATTR_SYS_MTIME_SET;
170 attrs->mask |= ORANGEFS_ATTR_SYS_CTIME;
179 attrs->perms = ORANGEFS_util_translate_mode(inode->i_mode);
180 attrs->mask |= ORANGEFS_ATTR_SYS_PERM;
216 struct ORANGEFS_sys_attr_s *attrs, char *link_target)
219 int type = orangefs_inode_type(attrs->objtype);