From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com ([66.111.4.27]:44161 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751912AbeEGNPl (ORCPT ); Mon, 7 May 2018 09:15:41 -0400 Date: Sun, 6 May 2018 18:15:59 -0700 From: Greg KH To: Jeff Layton Cc: stable@vger.kernel.org, willy@infradead.org Subject: Re: [v4.14.y PATCH] errseq: Always report a writeback error once Message-ID: <20180507011559.GA13198@kroah.com> References: <20180506155957.25163-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180506155957.25163-1-jlayton@kernel.org> Sender: stable-owner@vger.kernel.org List-ID: On Sun, May 06, 2018 at 11:59:57AM -0400, Jeff Layton wrote: > From: Matthew Wilcox > > The errseq_t infrastructure assumes that errors which occurred before > the file descriptor was opened are of no interest to the application. > This turns out to be a regression for some applications, notably Postgres. > > 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. > > This patch changes the errseq infrastructure to report errors to all > file descriptors which are opened after the error occurred, but before > it was reported to any file descriptor. This restores the user-visible > behaviour. > > [ jlayton: fix up conflicts in comments ] > > Cc: stable@vger.kernel.org > Fixes: 5660e13d2fd6 ("fs: new infrastructure for writeback error handling and reporting") > Signed-off-by: Matthew Wilcox > Reviewed-by: Jeff Layton > Signed-off-by: Jeff Layton > (cherry picked from commit b4678df184b314a2bd47d2329feca2c2534aa12b) > --- > lib/errseq.c | 25 +++++++++++-------------- > 1 file changed, 11 insertions(+), 14 deletions(-) > > This is a backport to the v4.14 stable series. The only merge conflict > was due to an earlier patch by Willy to flesh out the comments. There > were no code changes necessary. Thanks for the backport, now queued up. greg k-h