Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1136809ybl; Wed, 28 Aug 2019 10:08:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvu03Rx+B+YCOTEkMlbxbH1Esl/GAM3p3e1ORYkC/sPW8XxxqxChH2cB1k1ShE40S2n2K5 X-Received: by 2002:a62:8281:: with SMTP id w123mr5906615pfd.36.1567012122246; Wed, 28 Aug 2019 10:08:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567012122; cv=none; d=google.com; s=arc-20160816; b=rrIor3RL+3Q2mOU0QZnby27ST7q7GsQCsc9cascTsQi3vz3HQYPB2WuK3bNh7Z0oHL ypMHZGpYi7mnayxJ4jzTX85XE60evg4l4qX4HDVa4uFv41egq6BC2HVnV366wO65siyY uIJjW5/rVhOP7dXvy2T5upB7dc1/r6iuOveJrCl9ggadTBT2VYs2BJ76F/GRWtshI9um qT0WLtH1Oq+SgLxc7jGnMR9elg3dQsKgRD6WL0IAJzdoHGXzoTmF1s7/mx1D5YmQ46AR hAQpG3K9S9Qdu3Q6iZEx+NdrqzA06RMRXdCfEvfXb2JDeMUtNcNqfsAWK4LWlQUPg2/9 f6+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=JubgBFSzuq47nOQ2g/uJdFdY2QFEmUQ12Zm4ZQWULqg=; b=SXPAJzV9pxH0NZd3ltlc0QJ2fo+COmieJcT+fLrzwKlqqidmSu8e/exQX3tGb4ubuQ jt/f81XDEr5tO+Vnm2d6vxmdfS47T1onX5uMbTLnNiQteuC425Pha2PTb4Um4/uPH8N5 iXPPxnw6ZKU99wmUFE+ou24qXdBwLjc7+BL1fSH3bGfLOb9ahuxx6w8K4VDU5vSjOVX/ s7ycZRSJlrmsXjJklat9dMwmQgCw7W4w4PNBz+3yLQyHb/mVAp8RdR50VE5vQxuE74aT HZJwrmISWFH/B/kH1T4tJBd1mDHwCRP+ST9s5l22q5F8bg6DXqZmXwGalqplFfjo0lwq BX+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si2257951plf.350.2019.08.28.10.08.21; Wed, 28 Aug 2019 10:08:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726820AbfH1RHg (ORCPT + 99 others); Wed, 28 Aug 2019 13:07:36 -0400 Received: from fieldses.org ([173.255.197.46]:49180 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726315AbfH1RHg (ORCPT ); Wed, 28 Aug 2019 13:07:36 -0400 Received: by fieldses.org (Postfix, from userid 2815) id D91F81E29; Wed, 28 Aug 2019 13:07:35 -0400 (EDT) Date: Wed, 28 Aug 2019 13:07:35 -0400 From: Bruce Fields To: Chuck Lever Cc: Bruce Fields , Jeff Layton , Trond Myklebust , Linux NFS Mailing List Subject: Re: [PATCH 0/3] Handling NFSv3 I/O errors in knfsd Message-ID: <20190828170735.GD26284@fieldses.org> References: <1ee75165d548b336f5724b6d655aa2545b9270c3.camel@hammerspace.com> <20190828134839.GA26492@fieldses.org> <45582F32-69C7-4DC8-A608-E45038A44D42@oracle.com> <20190828140044.GA14249@parsley.fieldses.org> <990B7B57-53B8-4ECB-A08B-1AFD2FCE13A6@oracle.com> <31658faabfbe3b4c2925bd899e264adf501fbc75.camel@redhat.com> <20190828144031.GB14249@parsley.fieldses.org> <20190828144839.GA26284@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, Aug 28, 2019 at 10:50:30AM -0400, Chuck Lever wrote: > > > > On Aug 28, 2019, at 10:48 AM, Bruce Fields wrote: > > > > On Wed, Aug 28, 2019 at 10:40:31AM -0400, J. Bruce Fields wrote: > >> On Wed, Aug 28, 2019 at 10:16:09AM -0400, Jeff Layton wrote: > >>> For the most part, these sorts of errors tend to be rare. If it turns > >>> out to be a problem we could consider moving the verifier into > >>> svc_export or something? > >> > >> As Trond says, this isn't really a server implementation issue, it's a > >> protocol issue. If a client detects when to resend writes by storing a > >> single verifier per server, then returning different verifiers from > >> writes to different exports will have it resending every time it writes > >> to one export then another. > > > > The other way to limit this is by trying to detect the single-writer > > case, since it's probably also rare for multiple clients to write to the > > same file. > > > > Are there any common cases where two clients share the same TCP > > connection? Maybe that would be a conservative enough test? > > What happens if a client reconnects? Does that bump the verifier? > > If it reconnects from the same source port, can the server tell > that the connection is different? I assume it creates a new socket structure. So, you could key off either that or the (address, port) depending on whether you'd rather risk unnecessarily incrementing the verifier after a reconnection and write error, or risk failing to increment due to port reuse. There's some precedent to taking the latter choice in the DRC. But the DRC also includes some other stuff (xid, hash) to minimize the chance of a collision. If you took the former choice you wouldn't literally want to key off a pointer to the socket as it'd cause complications when freeing the socket. But maybe you could add some kind of birth time or generation number to struct svc_sock to help differentiate? --b. > > > > And you wouldn't have to track every connection that's ever sent a WRITE > > to a given file. Just remember the first one, with a flag to track > > whether anyone else has ever written to it. > > > > ?? > > > > --b. > > -- > Chuck Lever > >