From owner-freebsd-fs@FreeBSD.ORG Fri Aug 3 12:25:10 2007 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7921716A41B for ; Fri, 3 Aug 2007 12:25:10 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from ns.trinitel.com (186.161.36.72.static.reverse.ltdomains.com [72.36.161.186]) by mx1.freebsd.org (Postfix) with ESMTP id 45B9F13C48E for ; Fri, 3 Aug 2007 12:25:10 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from proton.local (209-163-168-124.static.twtelecom.net [209.163.168.124]) (authenticated bits=0) by ns.trinitel.com (8.14.1/8.14.1) with ESMTP id l73CP7o4033859 for ; Fri, 3 Aug 2007 07:25:07 -0500 (CDT) (envelope-from anderson@freebsd.org) Message-ID: <46B31EA0.4010603@freebsd.org> Date: Fri, 03 Aug 2007 07:25:04 -0500 From: Eric Anderson User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on ns.trinitel.com Subject: NFSv4 questions X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2007 12:25:10 -0000 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