Message ID | 20240125085758.2393327-3-hch@lst.de (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 1B83BC47422 for <linux-mm@archiver.kernel.org>; Thu, 25 Jan 2024 08:58:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A79FD280006; Thu, 25 Jan 2024 03:58:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A278F280001; Thu, 25 Jan 2024 03:58:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 854EE280006; Thu, 25 Jan 2024 03:58:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 75FA0280001 for <linux-mm@kvack.org>; Thu, 25 Jan 2024 03:58:14 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 3AEAB140C0A for <linux-mm@kvack.org>; Thu, 25 Jan 2024 08:58:14 +0000 (UTC) X-FDA: 81717231708.18.D1C19C4 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf17.hostedemail.com (Postfix) with ESMTP id C4F7840009 for <linux-mm@kvack.org>; Thu, 25 Jan 2024 08:58:12 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=Z3XEP95U; dmarc=none; spf=none (imf17.hostedemail.com: domain of BATV+b97a0fc658bf3e588113+7459+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+b97a0fc658bf3e588113+7459+infradead.org+hch@bombadil.srs.infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706173092; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=xkTkipsZ3cJs79h1k4zQ5uPIipflfgz0lHVVoqCuaRQ=; b=pejHBEwpf7kHEB+1ihzCfOM/vEueuO5zNLZEGa+JCiFC9QC4js3aXFbxUGfckZffWNOPcl kXVPBLZoCNZqBLraAUJZJNM+ZBGkIL6TAfcy3G+OdOPGEuKKRctNfgUJuXuTi9/wmqt4Ea oSChchP069RmmOSyzU9E7leuajuS6Os= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=Z3XEP95U; dmarc=none; spf=none (imf17.hostedemail.com: domain of BATV+b97a0fc658bf3e588113+7459+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+b97a0fc658bf3e588113+7459+infradead.org+hch@bombadil.srs.infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706173092; a=rsa-sha256; cv=none; b=aSy++EORGTXKUcTZz+OAEtd/uzYSrlwbD0ibD7Qyrzx0VNaGcvHguDxd4Oq5UeTaI2WAZE l4M/MuegB2D1tYFCCarOecqmiTCgBLv8bF3jF8/agnEONcPTBLCnPwDtvVhvKBGjdbdk6Y Mh+9JQxVSoqFcYXBpvbrTDbqVQxcm2w= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=xkTkipsZ3cJs79h1k4zQ5uPIipflfgz0lHVVoqCuaRQ=; b=Z3XEP95URFlirst2CbG0dJA364 FulC5T4auE+QQ1CfqyRb85iyZUG/TPGIRz5b0wz7TFrveqq3IdNZPwXIgIRRbr6NEALfARgSwvWOx HOiTEaXMXH8giauijMsmkpjphfncVFr2i+CdcM5P7ORAiBPrAHW6mSqcp0Z2JJDn03qMkxRCKBWQJ xUEWnDSWmFx6KsdgTmvqXzgUN0lUKW5JTLdLZlskqxCVmdYNC5ifTJBLUAUxGEz2nth6T+1RqkdAT riWAqFdM5DI2XAHdnBtVnh1L8WuYkmz6y2FwTQvZ7A+7O3awT4+96hnCM0clkbgm4A6kPyaJn2y36 mUR50Qng==; Received: from 2a02-8389-2341-5b80-39d3-4735-9a3c-88d8.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:39d3:4735:9a3c:88d8] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rSvYp-007Q9V-1E; Thu, 25 Jan 2024 08:58:11 +0000 From: Christoph Hellwig <hch@lst.de> To: linux-mm@kvack.org Cc: Matthew Wilcox <willy@infradead.org>, Jan Kara <jack@suse.com>, David Howells <dhowells@redhat.com>, Brian Foster <bfoster@redhat.com>, Christian Brauner <brauner@kernel.org>, "Darrick J. Wong" <djwong@kernel.org>, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara <jack@suse.cz>, Dave Chinner <dchinner@redhat.com> Subject: [PATCH 02/19] writeback: also update wbc->nr_to_write on writeback failure Date: Thu, 25 Jan 2024 09:57:41 +0100 Message-Id: <20240125085758.2393327-3-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240125085758.2393327-1-hch@lst.de> References: <20240125085758.2393327-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from <hch@infradead.org> by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Queue-Id: C4F7840009 X-Rspam-User: X-Rspamd-Server: r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Hsh5CP7GqmqKmpQhdvoz9KQstEmh42zMsnfNJttSjb/a2l6PoqQCvD3C+DZvxc/UUC9vX1bEV3T/VfClkP0ixhcM/81+Sk2HtUHCV2ahyFayvFvmIFYxG36511No24aGIf4Wg+YyBkG6IGx8SXOBc4z+rKLWPO3s0arrWRDRkpYpyBKotq4Z+ekcRt959Yg== 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
[01/19] writeback: fix done_index when hitting the wbc->nr_to_write
|
expand
|
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index ef2334291a7270..0c1e9c016bc48f 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2473,6 +2473,7 @@ int write_cache_pages(struct address_space *mapping, trace_wbc_writepage(wbc, inode_to_bdi(mapping->host)); error = writepage(folio, wbc, data); nr = folio_nr_pages(folio); + wbc->nr_to_write -= nr; if (unlikely(error)) { /* * Handle errors according to the type of @@ -2506,7 +2507,6 @@ int write_cache_pages(struct address_space *mapping, * we tagged for writeback prior to entering this loop. */ done_index = folio->index + nr; - wbc->nr_to_write -= nr; if (wbc->nr_to_write <= 0 && wbc->sync_mode == WB_SYNC_NONE) { done = 1;