From owner-freebsd-current@freebsd.org Wed Dec 30 12:53:19 2020 Return-Path: Delivered-To: freebsd-current@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 0AB674C28AE for ; Wed, 30 Dec 2020 12:53:19 +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 4D5WRf4gR4z3MmH; Wed, 30 Dec 2020 12:53:18 +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 0BUCrAkx036984 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 30 Dec 2020 14:53:13 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0BUCrAkx036984 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 0BUCr9gX036983; Wed, 30 Dec 2020 14:53:09 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 30 Dec 2020 14:53:09 +0200 From: Konstantin Belousov To: Rick Macklem Cc: "freebsd-current@freebsd.org" , Alan Somers , Kirk McKusick , Mark Johnston Subject: Re: r367672 broke the NFS server Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 4D5WRf4gR4z3MmH X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 12:53:19 -0000 On Wed, Dec 30, 2020 at 02:02:48AM +0000, Rick Macklem wrote: > Hi, > > Post r367671... > When multiple files are being created by an NFS client in the same > directory, the VOP_CREATE()/ufs_create() can fail with ERELOOKUP. > This results in a EIO return to the NFS client. > --> This causes "nfsv4 client/server protocol prob err=10026" > on the client for NFSv4.0 mounts. > --> This explains why this error has been reported by > several people lately, although it should "never happen". > > Unfortunately, for the NFS server, the Lookup call is done separately > and it will not be easy to redo it, given the current NFS code structure. > > Is there another way to deal with the problem r367672 was fixing that > avoids ufs_create() returning ERELOOKUP? Idea of the change is to restart the syscall at top level. So for NFS server the right approach is to not send a response and also to not free the request mbuf chain, but to restart processing. I am sorry I forgot about NFS server when designing this fix, the only mild excuse I can provide is that the change was quite complicated as is. I will start looking at the fix.