Lines Matching refs:stat
145 struct kstat *stat) in encode_fattr() argument
152 type = (stat->mode & S_IFMT); in encode_fattr()
155 *p++ = htonl((u32) stat->mode); in encode_fattr()
156 *p++ = htonl((u32) stat->nlink); in encode_fattr()
157 *p++ = htonl((u32) from_kuid(&init_user_ns, stat->uid)); in encode_fattr()
158 *p++ = htonl((u32) from_kgid(&init_user_ns, stat->gid)); in encode_fattr()
160 if (S_ISLNK(type) && stat->size > NFS_MAXPATHLEN) { in encode_fattr()
163 *p++ = htonl((u32) stat->size); in encode_fattr()
165 *p++ = htonl((u32) stat->blksize); in encode_fattr()
167 *p++ = htonl(new_encode_dev(stat->rdev)); in encode_fattr()
170 *p++ = htonl((u32) stat->blocks); in encode_fattr()
174 *p++ = htonl(new_encode_dev(stat->dev)); in encode_fattr()
187 *p++ = htonl((u32) stat->ino); in encode_fattr()
188 *p++ = htonl((u32) stat->atime.tv_sec); in encode_fattr()
189 *p++ = htonl(stat->atime.tv_nsec ? stat->atime.tv_nsec / 1000 : 0); in encode_fattr()
193 *p++ = htonl((u32) stat->ctime.tv_sec); in encode_fattr()
194 *p++ = htonl(stat->ctime.tv_nsec ? stat->ctime.tv_nsec / 1000 : 0); in encode_fattr()
200 …32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp, struct kstat *stat) in nfs2svc_encode_fattr() argument
202 return encode_fattr(rqstp, p, fhp, stat); in nfs2svc_encode_fattr()
421 p = encode_fattr(rqstp, p, &resp->fh, &resp->stat); in nfssvc_encode_attrstat()
430 p = encode_fattr(rqstp, p, &resp->fh, &resp->stat); in nfssvc_encode_diropres()
454 p = encode_fattr(rqstp, p, &resp->fh, &resp->stat); in nfssvc_encode_readres()
486 struct kstatfs *stat = &resp->stats; in nfssvc_encode_statfsres() local
489 *p++ = htonl(stat->f_bsize); in nfssvc_encode_statfsres()
490 *p++ = htonl(stat->f_blocks); in nfssvc_encode_statfsres()
491 *p++ = htonl(stat->f_bfree); in nfssvc_encode_statfsres()
492 *p++ = htonl(stat->f_bavail); in nfssvc_encode_statfsres()