From owner-svn-src-head@freebsd.org Fri Nov 13 10:35:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4BF5E2D62B3; Fri, 13 Nov 2020 10:35:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CXZbr31pxz3kXB; Fri, 13 Nov 2020 10:35:04 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 0ADAYnTt003173 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 13 Nov 2020 12:34:52 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0ADAYnTt003173 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 0ADAYncQ003172; Fri, 13 Nov 2020 12:34:49 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 13 Nov 2020 12:34:49 +0200 From: Konstantin Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r367631 - in head/sys: kern sys Message-ID: References: <202011130931.0AD9VwBL082843@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202011130931.0AD9VwBL082843@repo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4CXZbr31pxz3kXB X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [2.91 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; TO_DN_NONE(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; NEURAL_SPAM_MEDIUM(0.99)[0.992]; SPAMHAUS_ZRD(0.00)[2001:470:d5e7:1::1:from:127.0.2.255]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:470:d5e7:1::1:from]; NEURAL_SPAM_LONG(1.00)[0.997]; NEURAL_SPAM_SHORT(0.92)[0.919]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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: Fri, 13 Nov 2020 10:35:05 -0000 On Fri, Nov 13, 2020 at 09:31:58AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Fri Nov 13 09:31:57 2020 > New Revision: 367631 > URL: https://svnweb.freebsd.org/changeset/base/367631 > > Log: > Implement vn_lock_pair(). > > In collaboration with: pho > Reviewed by: mckusick (previous version), markj (previous version) > Tested by: markj (syzkaller), pho > Sponsored by: The FreeBSD Foundation > Differential revision: https://reviews.freebsd.org/D26136 > > Modified: > head/sys/kern/vfs_vnops.c > head/sys/sys/vnode.h > > Modified: head/sys/kern/vfs_vnops.c > ============================================================================== > --- head/sys/kern/vfs_vnops.c Fri Nov 13 02:05:45 2020 (r367630) > +++ head/sys/kern/vfs_vnops.c Fri Nov 13 09:31:57 2020 (r367631) > @@ -275,6 +276,10 @@ restart: > vn_finished_write(mp); > if (error) { > NDFREE(ndp, NDF_ONLY_PNBUF); > + if (error == ERELOOKUP) { > + NDREINIT(ndp); > + goto restart; > + } > return (error); > } > fmode &= ~O_TRUNC; > @@ -1524,6 +1529,7 @@ vn_truncate(struct file *fp, off_t length, struct ucre > > vp = fp->f_vnode; > > +retry: > /* > * Lock the whole range for truncation. Otherwise split i/o > * might happen partly before and partly after the truncation. > @@ -1550,6 +1556,8 @@ out: > vn_finished_write(mp); > out1: > vn_rangelock_unlock(vp, rl_cookie); > + if (error == ERELOOKUP) > + goto retry; > return (error); > } These chunks really belong to r367632 and not r367631, they leaked there due to my mishandling of the split. I am sorry for that, but I do not think it is reasonable to revert and re-commit.