Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Feb 2018 16:56:09 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r329384 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201802161656.w1GGu9VR001827@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Fri Feb 16 16:56:09 2018
New Revision: 329384
URL: https://svnweb.freebsd.org/changeset/base/329384

Log:
  Handle generic pathconf attributes in the .zfs ctldir
  
  MFC instructions: change the value of _PC_LINK_MAX to INT_MAX
  
  Reported by:	jhb
  MFC after:	19 days
  X-MFC-With:	329265
  Sponsored by:	Spectra Logic Corp

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c	Fri Feb 16 16:41:19 2018	(r329383)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c	Fri Feb 16 16:56:09 2018	(r329384)
@@ -743,7 +743,7 @@ zfsctl_common_pathconf(ap)
 	 */
 	switch (ap->a_name) {
 	case _PC_LINK_MAX:
-		*ap->a_retval = INT_MAX;
+		*ap->a_retval = MIN(LONG_MAX, ZFS_LINK_MAX);
 		return (0);
 
 	case _PC_FILESIZEBITS:
@@ -766,8 +766,12 @@ zfsctl_common_pathconf(ap)
 		*ap->a_retval = ACL_MAX_ENTRIES;
 		return (0);
 
+	case _PC_NAME_MAX:
+		*ap->a_retval = NAME_MAX;
+		return (0);
+
 	default:
-		return (EINVAL);
+		return (vop_stdpathconf(ap));
 	}
 }
 



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