From owner-svn-src-all@freebsd.org Tue Dec 19 22:40:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99A7AEA586A; Tue, 19 Dec 2017 22:40:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65CA16F4E6; Tue, 19 Dec 2017 22:40:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBJMeskP064255; Tue, 19 Dec 2017 22:40:54 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBJMesll064253; Tue, 19 Dec 2017 22:40:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201712192240.vBJMesll064253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 19 Dec 2017 22:40:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327006 - head/sys/fs/fuse X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/fs/fuse X-SVN-Commit-Revision: 327006 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2017 22:40:55 -0000 Author: jhb Date: Tue Dec 19 22:40:54 2017 New Revision: 327006 URL: https://svnweb.freebsd.org/changeset/base/327006 Log: Update link count handling in fuse for post-ino64. Set FUSE_LINK_MAX to UINT32_MAX instead of LINK_MAX to match the maximum link count possible in the 'nlink' field of 'struct fuse_attr'. Sponsored by: Chelsio Communications Modified: head/sys/fs/fuse/fuse_param.h head/sys/fs/fuse/fuse_vnops.c Modified: head/sys/fs/fuse/fuse_param.h ============================================================================== --- head/sys/fs/fuse/fuse_param.h Tue Dec 19 22:40:16 2017 (r327005) +++ head/sys/fs/fuse/fuse_param.h Tue Dec 19 22:40:54 2017 (r327006) @@ -77,6 +77,6 @@ #endif -#define FUSE_LINK_MAX LINK_MAX +#define FUSE_LINK_MAX UINT32_MAX #endif /* _FUSE_PARAM_H_ */ Modified: head/sys/fs/fuse/fuse_vnops.c ============================================================================== --- head/sys/fs/fuse/fuse_vnops.c Tue Dec 19 22:40:16 2017 (r327005) +++ head/sys/fs/fuse/fuse_vnops.c Tue Dec 19 22:40:54 2017 (r327006) @@ -1188,7 +1188,7 @@ fuse_vnop_pathconf(struct vop_pathconf_args *ap) *ap->a_retval = NAME_MAX; return (0); case _PC_LINK_MAX: - *ap->a_retval = FUSE_LINK_MAX; + *ap->a_retval = MIN(LONG_MAX, FUSE_LINK_MAX); return (0); case _PC_SYMLINK_MAX: *ap->a_retval = MAXPATHLEN;