Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Aug 2007 07:25:04 -0500
From:      Eric Anderson <anderson@freebsd.org>
To:        freebsd-fs@freebsd.org
Subject:   NFSv4 questions
Message-ID:  <46B31EA0.4010603@freebsd.org>

next in thread | raw e-mail | index | archive | help
Hi NFSv4 gurus,

While looking through the src, I noticed this:

in src/sys/nfs/nfsproto.h:

497 struct nfsv4_fattr {
498         u_int           fa4_valid;
499         nfstype         fa4_type;
500         off_t           fa4_size;
501         uint64_t        fa4_fsid_major;
502         uint64_t        fa4_fsid_minor;
503         uint64_t        fa4_fileid;
504         mode_t          fa4_mode;
505         nlink_t         fa4_nlink;
506         uid_t           fa4_uid;
507         gid_t           fa4_gid;
508         uint32_t        fa4_rdev_major;
509         uint32_t        fa4_rdev_minor;
510         struct timespec fa4_atime;
511         struct timespec fa4_btime;
512         struct timespec fa4_ctime;
513         struct timespec fa4_mtime;
514         uint64_t        fa4_maxread;
515         uint64_t        fa4_maxwrite;
516         uint64_t        fa4_ffree;
517         uint64_t        fa4_ftotal;
518         uint32_t        fa4_maxname;
519         uint64_t        fa4_savail;
520         uint64_t        fa4_sfree;
521         uint64_t        fa4_stotal;
522         uint64_t        fa4_changeid;
523         uint32_t        fa4_lease_time;
524         uint64_t        fa4_maxfilesize;
525 };
526


It seems to me the fa4_mode, and fa4_nlink should actually be declared 
as uint32_t, because the nlink_t and mode_t are actually 16bits.

See src/sys/sys/_types.h:

  49 typedef __uint16_t      __mode_t;       /* permissions */
  50 typedef int             __nl_item;
  51 typedef __uint16_t      __nlink_t;      /* link count */

See the NFSv4 rfc here:

http://www.ietf.org/rfc/rfc3530.txt


Can someone smack some sense into me please?

Eric






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46B31EA0.4010603>