Received: by 10.192.165.148 with SMTP id m20csp3909749imm; Mon, 23 Apr 2018 14:52:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx494ympiocPcW2BV8d6UCla+a+HntR0o7dOPHe5bkBIQhGnQvXBQmUS2pXZDOl0Qm78oMnq7 X-Received: by 2002:a17:902:8342:: with SMTP id z2-v6mr21981442pln.311.1524520363479; Mon, 23 Apr 2018 14:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524520363; cv=none; d=google.com; s=arc-20160816; b=YKpQuhcXQKt70XOGAmvoDfda3xse/O3TQygPhbfZInsBOHciuo3FncYM4rU9N9Ky3+ 6JI2DX/yq/T4K/8053AzaZID94gYYQ+iT2TKyMLaX/st5T+y9ft86Wq1xsw3ffdfKLhh QIpdmtYsmFtgi9UuQoyCHgSgutRyPx4RBlLtinoSktV58/MzuaA4o9fgJu1XwUF71hWU YAWU7w7GFpauMVawj1GS62IZmjq8qE5u/nQNmcHBU4UicXATpZ9uLoCB5ARqowU6rEu9 mLgoEkhtTXXIgsnEdbEORLuTxRZv/kLVyTKcnyTsXmCufinRNn9nAyRhsgH+qg0Ny1/V 2Q3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature:arc-authentication-results; bh=tkkpFdsOrJ55FVHAjF6v+4ZwUPxOI7kXnWPjA703qvU=; b=GWkF7v8qgR0UT8QCyVDLIZnFTRNZAjCWOjCsGwfO9HByCNw9O16LnaziVy8mGgY6W2 5vD7B9c5yC8dY7MveJivnV59aiklRhUECCyz9Lf16+rMBbsBJHfll0FaS5btbCyCExgD YxVeh3Nb0H448z8vDOCx0gBUNOC4QaKF1WJKgyidipnHyuPUa++Mti2GBHi144XYV+22 eFR3E7VCc8eGVVpdfVHsQPj4gcd25w+OzJ0Y88mze5YHr3tPBkikzimCrfNIdowTwaiB w/QRqP47FpmbgWTAFJqeQYf2Rv7M4nluqk+P2MDQ7u8FDx6VCEsIIfrC9tUiDilnQjaM SOJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm1 header.b=JNHNW4f8; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=YChnUSkn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 w6si9932452pgp.496.2018.04.23.14.52.28; Mon, 23 Apr 2018 14:52:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm1 header.b=JNHNW4f8; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=YChnUSkn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932582AbeDWVuh (ORCPT + 99 others); Mon, 23 Apr 2018 17:50:37 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:48493 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932318AbeDWVue (ORCPT ); Mon, 23 Apr 2018 17:50:34 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id CDF9E219DA; Mon, 23 Apr 2018 17:50:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 23 Apr 2018 17:50:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=tkkpFdsOrJ55FVHAjF6v+4ZwUPxOI7kXnWPjA703qvU=; b=JNHNW4f8 kB46p1tt2URylHVv4DgcUHcLCWW72s2mbAfKwdcmkzbSOwkDQlMks04W/GubecmM mvu011mCisrphqNRh812y6Eo8b6XWim3LGJXvem5VFCHvBZczVPceeSAQa89nm8h NI7E7mpMcJVFu7fRmP6lrt+5JC46v/SgPRnYDnrSezNnhdLYE3iZKROMxzjuOoFo nMerFCkAiEIXhI45XHJyXPNTIQSL7JHrlFj4JmKbne2rL9fmqzHadPkwrBAb0p49 /f2MaBg1FV9nJlZvJhZJx8j0dDh6ZqpZEcnRl8iYnrJFo4X9cn1wOpRt1AncmBq3 +SyC4hS7ogHfpQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=tkkpFdsOrJ55FVHAjF6v+4ZwUPxOI 7kXnWPjA703qvU=; b=YChnUSknnyORL2Z47t+ydlotnboryXIWLmqLSvr+Wv3Fv ulLoEShp638aBEIw8BMASEIcHEGnen5zL7EbkTC8IpcqkgG8SeJdABnb8rmu8C4t QVLWyF2RLof2R/hE6PBIZwqpxnAGpovwEtSbtrylY4gqq/g57gF5r4kWCrN9DCd8 y2bCV43WpwMUzbaSl2fTNkgL8TDSBWnr9GDadgl4EnIrGcv5SqxhuT5vlyoJxT6j mJDYBCO5NYJyC9fgt2FIkDZrrfy1WshDe4n9o0+zowfEuC+C9xaXb/2O2sjDHcbA GrNnV+xHVXnPi+OYtwM+lHQcO2ys23j2T6gyGljtQ== X-ME-Sender: Received: from intern.anarazel.de (unknown [198.233.165.212]) by mail.messagingengine.com (Postfix) with ESMTPA id 72F29E4B94; Mon, 23 Apr 2018 17:50:33 -0400 (EDT) Date: Mon, 23 Apr 2018 14:50:32 -0700 From: Andres Freund To: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, Jeff Layton , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Always report a writeback error once Message-ID: <20180423215032.qfk3ktoadf4tofrq@alap3.anarazel.de> References: <20180423204208.GG13383@bombadil.infradead.org> <20180423205730.34wvykqhefbkrtfw@alap3.anarazel.de> <20180423214348.GH13383@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180423214348.GH13383@bombadil.infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-04-23 14:43:48 -0700, Matthew Wilcox wrote: > On Mon, Apr 23, 2018 at 01:57:30PM -0700, Andres Freund wrote: > > I've never really looked at this code in any depth before, but won't > > this potentially lead to the same error being reported on multiple FDs? > > Imagine two fds (potentially in different processes) getting the 0 > > returned by errseq_sample() because it's not ERRSEQ_SEEN. Afaict > > file_check_and_advance_wb_err() will return an error that's always > > unlike 0 in that case, and thus the error will returned on both fds? > > > > I'm personally perfectly fine with that, but it's not necessarily what's > > described as desired in your email?. > > That's what I was trying to say with this paragraph: > > > > This patch restores that behaviour by reporting errors to file descriptors > > > which are opened after the error occurred, but before it was reported > > > to any file descriptor. > > Maybe it was a little unclear? I'd appreciate a suggestion on making > it clearer. I think I was thinking of the following paragraph from your commit message: > Before errseq_t, a writeback error would be reported exactly once (as > long as the inode remained in memory), so Postgres could open a file, > call fsync() and find out whether there had been a writeback error on > that file from another process. Note the "exactly once", making "that behaviour" in the following paragraph potentially refer to exactly once: > This patch restores that behaviour by reporting errors to file descriptors > which are opened after the error occurred, but before it was reported > to any file descriptor. Just adding a sentence here saying something like "This means that the error might be reported to more fds than before." or such would address that potential ambiguity? > I think this behaviour is perfectly justifiable. I agree. Greetings, Andres Freund