Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Dec 2017 22:40:54 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r327006 - head/sys/fs/fuse
Message-ID:  <201712192240.vBJMesll064253@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



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