Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4867287ybl; Mon, 26 Aug 2019 17:48:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqxp+kFhzUs2FtxGxR+WHarJtVbP7XHR3hpjYMS3z8uREoSTUBAxkHAUEdyvVMKl/UjBOf94 X-Received: by 2002:a17:902:1121:: with SMTP id d30mr21606883pla.174.1566866932459; Mon, 26 Aug 2019 17:48:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566866932; cv=none; d=google.com; s=arc-20160816; b=KZws5bRzlVHxPItbgnMgkkqDxC5DjvRfytYNoHR6+U2OxhqE9ZBASeVaj/pI67MKpA dFEDLA9IuTCKM8yJWnpg+Ty0dr8bEFEZckwfC1c3t8wabn8VTD3bG01AyaeGkQdU/47M kEacXAkH2bgHhnJFxNdkrUzo55PoDBAZUywZMspsNn0XbvTkq6mhB7ykCIrNefzuTlbq L2R1BDusN2zmPAdZWIplXh2aCZEJKB/0HXVx+B2syDbJVDQ9RYiGPJ/O73SRNxqLaP9Y EgY3bBiosmZnJVvTtog98YTHprSxgvPHDeP+0EgUv7todfM4WxHi0LHcFoVWr1j/98s4 a2dA== 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=KuJev2I14BVtfmm6aIcHJxvxJ3NPyQg7v8YXLLoYLmA=; b=NicEaG53wayrlGuQh5Kv8dC4tnST4suAgFEIwExBJlwUXpFmRKOuTv5fQn3VejqKND CRttfczfEtvswv1sM5fMI1ACSLfXE3WvQAWPZHQ6C1AQpDZicCHNByXKojXh/1Swwgdd sbjw+xEJrNAhOHM5JhtyAT10FBObud3OQeTJ/uNk+xdMtOWDSbTNO3/2yDLzE83KeHdj HBSm8ZxawCVqPKMLKvV0gT4NclNGsEV20VmyZNdYqX/odCxMTQDhaVp3E29LXIY+8Tl8 Kl2Jc+R9Tw31mlCC9kmH6Jo5/iuQKTMVHQjB96JL3S/zZ/A6z+5JlhXHTAAVpbAt+ms+ rvFQ== 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 o6si12288700pfb.230.2019.08.26.17.48.26; Mon, 26 Aug 2019 17:48:52 -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 S1727251AbfH0AsM (ORCPT + 99 others); Mon, 26 Aug 2019 20:48:12 -0400 Received: from fieldses.org ([173.255.197.46]:47088 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726307AbfH0AsM (ORCPT ); Mon, 26 Aug 2019 20:48:12 -0400 Received: by fieldses.org (Postfix, from userid 2815) id A2A551E3B; Mon, 26 Aug 2019 20:48:11 -0400 (EDT) Date: Mon, 26 Aug 2019 20:48:11 -0400 From: "bfields@fieldses.org" To: Trond Myklebust Cc: "linux-nfs@vger.kernel.org" , "bfields@redhat.com" Subject: Re: [PATCH 0/3] Handling NFSv3 I/O errors in knfsd Message-ID: <20190827004811.GA30827@fieldses.org> References: <20190826165021.81075-1-trond.myklebust@hammerspace.com> <20190826205156.GA27834@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 Mon, Aug 26, 2019 at 09:02:31PM +0000, Trond Myklebust wrote: > On Mon, 2019-08-26 at 16:51 -0400, J. Bruce Fields wrote: > > On Mon, Aug 26, 2019 at 12:50:18PM -0400, Trond Myklebust wrote: > > > Recently, a number of changes went into the kernel to try to > > > ensure that I/O errors (specifically write errors) are reported to > > > the application once and only once. The vehicle for ensuring the > > > errors are reported is the struct file, which uses the 'f_wb_err' > > > field to track which errors have been reported. > > > > > > The problem is that errors are mainly intended to be reported > > > through fsync(). If the client is doing synchronous writes, then > > > all is well, but if it is doing unstable writes, then the errors > > > may not be reported until the client calls COMMIT. If the file > > > cache has thrown out the struct file, due to memory pressure, or > > > just because the client took a long while between the last WRITE > > > and the COMMIT, then the error report may be lost, and the client > > > may just think its data is safely stored. > > > > These were lost before the file caching patches as well, right? Or > > is there some regression? > > Correct. This is not a regression, but an attempt to fix a problem > that has existed for some time now. > > > > > > Note that the problem is compounded by the fact that NFSv3 is > > > stateless, so the server never knows that the client may have > > > rebooted, so there can be no guarantee that a COMMIT will ever be > > > sent. > > > > > > The following patch set attempts to remedy the situation using 2 > > > strategies: > > > > > > 1) If the inode is dirty, then avoid garbage collecting the file > > > from the file cache. 2) If the file is closed, and we see that it > > > would have reported an error to COMMIT, then we bump the boot > > > verifier in order to ensure the client retransmits all its writes. > > > > Sounds sensible to me. > > > > > Note that if multiple clients were writing to the same file, then > > > we probably want to bump the boot verifier anyway, since only one > > > COMMIT will see the error report (because the cached file is also > > > shared). > > > > I'm confused by the "probably should". So that's future work? I > > guess it'd mean some additional work to identify that case. You > > can't really even distinguish clients in the NFSv3 case, but I > > suppose you could use IP address or TCP connection as an > > approximation. > > I'm suggesting we should do this too, but I haven't done so yet in > these patches. I'd like to hear other opinions (particularly from you, > Chuck and Jeff). Does this process actually converge, or do we end up with all the clients retrying the writes and, again, only one of them getting the error? I wonder what the typical errors are, anyway. --b.