From owner-svn-src-head@freebsd.org Wed Dec 20 00:27:45 2017 Return-Path: Delivered-To: svn-src-head@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 20484E85B59; Wed, 20 Dec 2017 00:27:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F23EC72E61; Wed, 20 Dec 2017 00:27:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (astound-66-234-202-155.ca.astound.net [66.234.202.155]) by mail.baldwin.cx (Postfix) with ESMTPSA id 91A5510A87D; Tue, 19 Dec 2017 19:27:43 -0500 (EST) From: John Baldwin 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 Date: Tue, 19 Dec 2017 15:59:52 -0800 Message-ID: <1822377.LL8RI7UkXd@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201712192354.vBJNsiok096492@repo.freebsd.org> References: <201712192354.vBJNsiok096492@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 19 Dec 2017 19:27:43 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Dec 2017 00:27:45 -0000 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