Lines Matching refs:attr
145 void fuse_change_attributes_common(struct inode *inode, struct fuse_attr *attr, in fuse_change_attributes_common() argument
157 inode->i_ino = fuse_squash_ino(attr->ino); in fuse_change_attributes_common()
158 inode->i_mode = (inode->i_mode & S_IFMT) | (attr->mode & 07777); in fuse_change_attributes_common()
159 set_nlink(inode, attr->nlink); in fuse_change_attributes_common()
160 inode->i_uid = make_kuid(fc->user_ns, attr->uid); in fuse_change_attributes_common()
161 inode->i_gid = make_kgid(fc->user_ns, attr->gid); in fuse_change_attributes_common()
162 inode->i_blocks = attr->blocks; in fuse_change_attributes_common()
163 inode->i_atime.tv_sec = attr->atime; in fuse_change_attributes_common()
164 inode->i_atime.tv_nsec = attr->atimensec; in fuse_change_attributes_common()
167 inode->i_mtime.tv_sec = attr->mtime; in fuse_change_attributes_common()
168 inode->i_mtime.tv_nsec = attr->mtimensec; in fuse_change_attributes_common()
169 inode->i_ctime.tv_sec = attr->ctime; in fuse_change_attributes_common()
170 inode->i_ctime.tv_nsec = attr->ctimensec; in fuse_change_attributes_common()
173 if (attr->blksize != 0) in fuse_change_attributes_common()
174 inode->i_blkbits = ilog2(attr->blksize); in fuse_change_attributes_common()
187 fi->orig_ino = attr->ino; in fuse_change_attributes_common()
190 void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr, in fuse_change_attributes() argument
207 fuse_change_attributes_common(inode, attr, attr_valid); in fuse_change_attributes()
216 i_size_write(inode, attr->size); in fuse_change_attributes()
222 if (oldsize != attr->size) { in fuse_change_attributes()
223 truncate_pagecache(inode, attr->size); in fuse_change_attributes()
228 .tv_sec = attr->mtime, in fuse_change_attributes()
229 .tv_nsec = attr->mtimensec, in fuse_change_attributes()
245 static void fuse_init_inode(struct inode *inode, struct fuse_attr *attr) in fuse_init_inode() argument
247 inode->i_mode = attr->mode & S_IFMT; in fuse_init_inode()
248 inode->i_size = attr->size; in fuse_init_inode()
249 inode->i_mtime.tv_sec = attr->mtime; in fuse_init_inode()
250 inode->i_mtime.tv_nsec = attr->mtimensec; in fuse_init_inode()
251 inode->i_ctime.tv_sec = attr->ctime; in fuse_init_inode()
252 inode->i_ctime.tv_nsec = attr->ctimensec; in fuse_init_inode()
264 new_decode_dev(attr->rdev)); in fuse_init_inode()
286 int generation, struct fuse_attr *attr, in fuse_iget() argument
300 if (!fc->writeback_cache || !S_ISREG(attr->mode)) in fuse_iget()
303 fuse_init_inode(inode, attr); in fuse_iget()
305 } else if ((inode->i_mode ^ attr->mode) & S_IFMT) { in fuse_iget()
316 fuse_change_attributes(inode, attr, attr_valid, attr_version); in fuse_iget()
397 static void convert_fuse_statfs(struct kstatfs *stbuf, struct fuse_kstatfs *attr) in convert_fuse_statfs() argument
400 stbuf->f_bsize = attr->bsize; in convert_fuse_statfs()
401 stbuf->f_frsize = attr->frsize; in convert_fuse_statfs()
402 stbuf->f_blocks = attr->blocks; in convert_fuse_statfs()
403 stbuf->f_bfree = attr->bfree; in convert_fuse_statfs()
404 stbuf->f_bavail = attr->bavail; in convert_fuse_statfs()
405 stbuf->f_files = attr->files; in convert_fuse_statfs()
406 stbuf->f_ffree = attr->ffree; in convert_fuse_statfs()
407 stbuf->f_namelen = attr->namelen; in convert_fuse_statfs()
656 struct fuse_attr attr; in fuse_get_root_inode() local
657 memset(&attr, 0, sizeof(attr)); in fuse_get_root_inode()
659 attr.mode = mode; in fuse_get_root_inode()
660 attr.ino = FUSE_ROOT_ID; in fuse_get_root_inode()
661 attr.nlink = 1; in fuse_get_root_inode()
662 return fuse_iget(sb, 1, 0, &attr, 0, 0); in fuse_get_root_inode()