Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756768AbdDQW4Z (ORCPT ); Mon, 17 Apr 2017 18:56:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:53076 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752050AbdDQW4W (ORCPT ); Mon, 17 Apr 2017 18:56:22 -0400 From: NeilBrown To: Jeff Layton , linux-fsdevel@vger.kernel.org Date: Tue, 18 Apr 2017 08:56:13 +1000 Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, tytso@mit.edu, jack@suse.cz, willy@infradead.org, viro@zeniv.linux.org.uk Subject: Re: [PATCH v2 08/17] fs: retrofit old error reporting API onto new infrastructure In-Reply-To: <1492036881.19286.1.camel@redhat.com> References: <20170412120614.6111-1-jlayton@redhat.com> <20170412120614.6111-9-jlayton@redhat.com> <87fuhduvcv.fsf@notabene.neil.brown.name> <1492036881.19286.1.camel@redhat.com> Message-ID: <87vaq2tzhu.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2323 Lines: 56 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, Apr 12 2017, Jeff Layton wrote: > On Thu, 2017-04-13 at 08:14 +1000, NeilBrown wrote: >>=20 >> I suspect that the filemap_check_wb_error() will need to be moved >> into some parent of the current call site, which is essentially what you >> suggest below. It would be nice if we could do that first, rather than >> having the current rather odd code. But maybe this way is an easier >> transition. It isn't obviously wrong, it just isn't obviously right >> either. >>=20 > > Yeah. It's just such a daunting task to have to change so much of the > existing code. I'm looking for ways to make this simpler. > > I think it probably is reasonable for filemap_write_and_wait* to just > sample it as early as possible in those functions. filemap_fdatawait is > the real questionable one, as you may have already had some writebacks > complete with errors. > > In any case, my thinking was that the old code is not obviously correct > either, so while this shortens the "error capture window" on these > calls, it seems like a reasonable place to start improving things. I agree. It wouldn't hurt to add a note to this effect in the patch comment so that people understand that the code isn't seen to be "correct" but only "no worse" with clear direction on what sort of improvement might be appropriate. Thanks, NeilBrown --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAlj1SA0ACgkQOeye3VZi gbm44Q//eRAhAGjWojdYj0RcsQq9y3x8Ma3sQY/vICRpRLdl9TCN4qbZbRbVCJqa rDRU7J5kTfQ/UPzugjJalHYJXAgflkOvAVXHvKxo+q/2X3ySiS+cda3Wseq44+M2 /rpLQDrAkt9rGpC/F84lXnrd0D2e5WwMsYDJ+WhO67kSVoRO6R/br6AUZRx4Ajjd BU4jGyX5Innq9kT3Ey9vPu3gtwbGFiWmSF3KP4TeRvNl1z2ket6bVnQBShiSJLlL Y7kPVLDPPtv7i8Tav/xDoLIhrS5MYcsXtdQSkl2Bf4Jbnfc+FD0aLKWy3UYviFy2 2i0VWoJqwy+OHfZ/SBSd5G+nNalUH6diPVD5EcsUU61Nt8ZCVxaEVitm8FE5xLXP sV7ku7Gv7v1nMKKrNG4hpCB4aaVp85dd+6w3EnWgBI/4QJqtF/WvdQcmOnCftfIB fA/JYtmPuzFf9CQxTdNxuLhmeC54ZDq0T8/wGxxUlGcRmA/cKFtzvCsOoACFnDPd oeg+5PlgWoqa9qzl7x7pdeWmpMjkuogB3xNzSV5IGDE+QwSXJ62IGlU/lxcV1+GC UKkLHor9xZVy8lTbiNCGCM3ujHMfB7ZzyKS/UMxUXc6BnjpMn+6h9mShoNWSbVCk Rnwp4pWfFmTA2+qRO0M2OsV6EUejm50iVEhcMrIoA4LoDfLDNww= =VGc0 -----END PGP SIGNATURE----- --=-=-=--