svn commit: r327009 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

John Baldwin jhb at freebsd.org
Wed Dec 20 00:27:45 UTC 2017


On Tuesday, December 19, 2017 11:54:44 PM John Baldwin wrote:
> Author: jhb
> Date: Tue Dec 19 23:54:44 2017
> New Revision: 327009
> URL: https://svnweb.freebsd.org/changeset/base/327009
> 
> Log:
>   Don't return early for non-failure for one of the EMLINK checks.
>   
>   r326987 enabled two #if 0'd-out EMLINK checks in zfs_link_create() for
>   link overflow.  However, one of the checks (when the vnode adding a link
>   is a directory such as for mkdir) always returned even if the link did not
>   overflow.  Change this to only return early if it needs to report an
>   EMLINK error.

Most of the callers of zfs_link_create() explicitly don't check for errors, so
any EMLINK error is silently dropped and not reported anyway if you manage to
overflow the link count.  The Solaris code appears to just not detect/care
about overflow.  Perhaps it takes so long to actually create 2^64 links to
trigger an overflow that it can be safely ignored in which case we could just
drop these (ignored) checks.  If the error handling isn't atrocious it might
be nice to fix the callers to honor errors though.

-- 
John Baldwin


More information about the svn-src-all mailing list