Date: Tue, 19 Dec 2017 15:59:52 -0800 From: John Baldwin <jhb@freebsd.org> To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327009 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <1822377.LL8RI7UkXd@ralph.baldwin.cx> In-Reply-To: <201712192354.vBJNsiok096492@repo.freebsd.org> References: <201712192354.vBJNsiok096492@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1822377.LL8RI7UkXd>