func: static void v9fs_getattr(void *opaque) int32_t fid ; size_t offset = 7 ; struct stat stbuf ; V9fsFidState * fidp ; V9fsStatDotl v9stat_dotl ; V9fsPDU * pdu = opaque ; V9fsState * s = pdu -> s ; retval = pdu_unmarshal ( pdu , offset , "dq" , & fid , & request_mask ); if ( retval < 0 )  fidp = get_fid ( pdu , fid ); static V9fsFidState *get_fid(V9fsPDU *pdu, int32_t fid) int err ; V9fsFidState * f ; V9fsState * s = pdu -> s ; for (f = s->fid_list; f; f = f->next) if ( f -> fid == fid )  f -> ref ++; err = v9fs_reopen_fid ( pdu , f ); if ( err < 0 )  return NULL ; f -> flags |= FID_REFERENCED; return f ; return NULL ; if ( fidp == NULL )  retval = v9fs_co_lstat ( pdu , & fidp -> path , & stbuf ); if ( retval < 0 )  stat_to_v9stat_dotl ( s , & stbuf , & v9stat_dotl ); static void stat_to_v9stat_dotl(V9fsState *s, const struct stat V9fsStatDotl *v9lstat) memset ( v9lstat , 0 , sizeof ( * v9lstat ) ); v9lstat -> st_mode = stbuf -> st_mode; v9lstat -> st_nlink = stbuf -> st_nlink; v9lstat -> st_uid = stbuf -> st_uid; v9lstat -> st_gid = stbuf -> st_gid; v9lstat -> st_rdev = stbuf -> st_rdev; v9lstat -> st_size = stbuf -> st_size; v9lstat -> st_blksize = stbuf -> st_blksize; v9lstat -> st_blocks = stbuf -> st_blocks; v9lstat -> st_atime_sec = stbuf -> st_atime; v9lstat -> st_atime_nsec = stbuf -> st_atim . tv_nsec; v9lstat -> st_mtime_sec = stbuf -> st_mtime; v9lstat -> st_mtime_nsec = stbuf -> st_mtim . tv_nsec; v9lstat -> st_ctime_sec = stbuf -> st_ctime; v9lstat -> st_ctime_nsec = stbuf -> st_ctim . tv_nsec; v9lstat -> st_result_mask = P9_STATS_BASIC; stat_to_qid ( stbuf , & v9lstat -> qid ); static void stat_to_qid(const struct stat *stbuf, V9fsQID *qidp) memset ( & qidp -> path , 0 , sizeof ( qidp -> path ) ); size = MIN ( sizeof ( stbuf -> st_ino ) , sizeof ( qidp -> path ) ); memcpy ( & qidp -> path , & stbuf -> st_ino , size ); qidp -> version = stbuf -> st_mtime ^ ( stbuf -> st_size << 8 ); qidp -> type = 0; qidp -> type |= P9_QID_TYPE_DIR; qidp -> type |= P9_QID_TYPE_SYMLINK; 