From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F30FFC47DDB for ; Tue, 30 Jan 2024 14:27:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5CE1F6B0078; Tue, 30 Jan 2024 09:27:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 57E446B007B; Tue, 30 Jan 2024 09:27:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 446086B007D; Tue, 30 Jan 2024 09:27:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 322536B0078 for ; Tue, 30 Jan 2024 09:27:12 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 01DA91205BB for ; Tue, 30 Jan 2024 14:27:11 +0000 (UTC) X-FDA: 81736204704.13.D31A1AB Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf16.hostedemail.com (Postfix) with ESMTP id 1AC28180028 for ; Tue, 30 Jan 2024 14:27:09 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=flw46umo; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf16.hostedemail.com: domain of bfoster@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bfoster@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706624830; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=zaujk7yqT3tCcvpOY/dPJbxkbTmDPNwYZxgb8W+DENY=; b=JyyLuhWOkRlctOVIQR2Zl4hHs6ucYXYE7eMrpZv7hR8lnp4hEXQ21FvkhaXXLs4XS4sEpN 6JpanjPxXXHPV3ARvUdSt9JoBT4YyWOfAY+B15g/HPj9nZZUIMBW16OaMnn6z3ut20LOnp Sty4Y+wUVUE/BsfU5+xMYlthysffVi8= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=flw46umo; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf16.hostedemail.com: domain of bfoster@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bfoster@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706624830; a=rsa-sha256; cv=none; b=LXvytXdlxqy8SCVU/4yB4+YO3S3qSV93KB+kePcd3W70goCuP3MFtZuv2YZRwFT2S/82Ht wMB3hR4V3QMm0ScteXi9VO1uOF5mwps0UOyTDPe9xJS2SZo5DZ0IevJDNaSSSjo6CtRuWu gQxQTw1GuuKiy8t6AM+zA89wpoatucU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706624829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zaujk7yqT3tCcvpOY/dPJbxkbTmDPNwYZxgb8W+DENY=; b=flw46umoxVfIprBmP6pFN8qRPRGatc0DuJZHcnhS6exX5Qx+xhqv95rqGeGkvO7UbPTLGu SUi+4zACrqH4ALclRmWVC1jUAA/9mpDAmUrrjdqHDnIJfiWu+DdCvjaxkpUxXExTxPFRoL tEAXRaq/wOYALhHTUavDdKkj6Mz46ro= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-678-iuQoh3B7NLejN0iWnFWjiw-1; Tue, 30 Jan 2024 09:27:05 -0500 X-MC-Unique: iuQoh3B7NLejN0iWnFWjiw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6E1723806711; Tue, 30 Jan 2024 14:27:04 +0000 (UTC) Received: from bfoster (unknown [10.22.32.186]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E9862134; Tue, 30 Jan 2024 14:27:03 +0000 (UTC) Date: Tue, 30 Jan 2024 09:28:22 -0500 From: Brian Foster To: Christoph Hellwig Cc: linux-mm@kvack.org, Matthew Wilcox , Jan Kara , David Howells , Christian Brauner , "Darrick J. Wong" , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara , Dave Chinner Subject: Re: [PATCH 06/19] writeback: Factor out writeback_finish() Message-ID: References: <20240125085758.2393327-1-hch@lst.de> <20240125085758.2393327-7-hch@lst.de> <20240130140459.GA31126@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240130140459.GA31126@lst.de> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Rspamd-Queue-Id: 1AC28180028 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: pungbaqziy9bbr9ynncsjhkgm8ttnyu8 X-HE-Tag: 1706624829-497977 X-HE-Meta: U2FsdGVkX1+RVDfI0sMUBV7D+pmydrGjiGQoEHH6BTu5rnyA9JsGDi3KORG9MC9K0H3V7m5CC291LqkNyW9rKLDbh+4gO5dk9B1usN6dfpMxlfVXOzGxFQDj50xp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1XKzxFrgLMDLSCmSalgpodafFhOUnncqA= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Tue, Jan 30, 2024 at 03:04:59PM +0100, Christoph Hellwig wrote: > On Mon, Jan 29, 2024 at 03:13:47PM -0500, Brian Foster wrote: > > > @@ -2481,6 +2500,9 @@ int write_cache_pages(struct address_space *mapping, > > > folio_unlock(folio); > > > error = 0; > > > } > > > + > > > > JFYI: whitespace damage on the above line. > > Thanks, fixed. > > > > > > + if (error && !wbc->err) > > > + wbc->err = error; > > > > > > > Also what happened to the return of the above "first error encountered" > > for the WB_SYNC_ALL case? Is that not needed for some reason (and so the > > comment just below might require an update)? > > No, this got broken during the various rebases (and is fixed again later > in the series). We need to return wbc->err from write_cache_pages at > this stage, I'll fix it. > Ok, I noticed it was added back once I got to more of the iter abstraction bits and so figured it was a transient/unintentional thing. The above tweak makes sense to me. FWIW, I haven't stared at the final patch long enough to have a strong opinion. I tend to agree with Jan that the error handling logic in the current series is a little wonky in that it's one of those things I'd have to go read the implementation every time to remember what it does, but the broader changes all seem reasonable to me. So for patches 1-18 and with the above tweak: Reviewed-by: Brian Foster