Message ID | 20240212071348.1369918-5-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 56175C48297 for <linux-mm@archiver.kernel.org>; Mon, 12 Feb 2024 07:14:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DCAF86B007B; Mon, 12 Feb 2024 02:14:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D7C5D6B007E; Mon, 12 Feb 2024 02:14:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C42F96B0080; Mon, 12 Feb 2024 02:14:12 -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 B57DA6B007B for <linux-mm@kvack.org>; Mon, 12 Feb 2024 02:14:12 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 8BA97C08BB for <linux-mm@kvack.org>; Mon, 12 Feb 2024 07:14:12 +0000 (UTC) X-FDA: 81782287944.22.628DFFB Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf25.hostedemail.com (Postfix) with ESMTP id DC320A0013 for <linux-mm@kvack.org>; Mon, 12 Feb 2024 07:14:10 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=dJIvNT8i; spf=none (imf25.hostedemail.com: domain of BATV+56c964bc8172c8a9ee6e+7477+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+56c964bc8172c8a9ee6e+7477+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707722050; 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=2QW1YOpfZggQarO2hJ9pUOEEOVq5PMz3pyBHLyK4cac=; b=PH6JZaNkfCoSrcCCTTNY9DrHiEU7duQ7JW9qfXnRe5YpVSdWyqYeHXqAvvaqdOCWbvWyOU eY0uys2AhOSJF3kHTcVnu/TO6faoHln/N5dlyDxzCME1++vQ9HOMm9o5ZEaR5ZwFzjNPWL tiOFID5wtn6MLTGsOfDIzlvRpGWIRGg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707722050; a=rsa-sha256; cv=none; b=wav/AHFEHYMX7pNQT/ckV0VHMj6vhaH2tKFQOcDQ0adLb/pTWvuASnkCyawnx1OO/RxDwZ Rw2A961pWj7qk4ZdIGz4tlgg9MooWtVz17e+o0rg2UohHucCAsrUlCsHJ9t6hKY/O/GNoK HaSzZTunUJPkeZ+0TOOgKqB5ocLMAJ8= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=dJIvNT8i; spf=none (imf25.hostedemail.com: domain of BATV+56c964bc8172c8a9ee6e+7477+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+56c964bc8172c8a9ee6e+7477+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none 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=2QW1YOpfZggQarO2hJ9pUOEEOVq5PMz3pyBHLyK4cac=; b=dJIvNT8iPWSyPAEA1cLuE0R6F/ +MI3j0k2PaFmoed7PIV31w4cjyiO/A9tRJ1wuYiDzg0P6+2xn9yGpkqkoU84H/uyqGDD8/8PxBBfQ AFkG/svjPlhqN9q9KovsSyxhMQnnhYP6eKBcGdGQ7cpErALum72bOaABOLi3nWI08NNWV6YIRTDM4 XaZWfmZtuFb7tRrSdMIatAztr8Wku7CuRHPn8WD52iMGkhxkDKK2RFyyLSDnYhpbrmDbaWIBV1wEY EM+HyvMdvT7MosOnjNsAmMCaAYPWgIVZa2GMzHwxyB+/wjpNd1Fa1LR87khgeDjw5xO/CjND/s9mR /fh/xOzA==; Received: from [2001:4bb8:190:6eab:75e9:7295:a6e3:c35d] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZQW1-00000004Sqd-1p3o; Mon, 12 Feb 2024 07:14:09 +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>, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara <jack@suse.cz>, Dave Chinner <dchinner@redhat.com> Subject: [PATCH 04/14] writeback: also update wbc->nr_to_write on writeback failure Date: Mon, 12 Feb 2024 08:13:38 +0100 Message-Id: <20240212071348.1369918-5-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240212071348.1369918-1-hch@lst.de> References: <20240212071348.1369918-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-Stat-Signature: f5apunoknugq71sjarpcdib73i1djqsa X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: DC320A0013 X-Rspam-User: X-HE-Tag: 1707722050-515096 X-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6gOd2o/JA/CK9SbvyJ14QrPMe/5pzBcHCf3PMRv9znl5LrxvxAb+ZnwC88zh7dhSynbIEgHFMFEOeyT/gNCIMpnuUPAuX1AJmXFemErJGYPlS80ZqVzeX2PEXWtLTTPrSAzv4AbLGJdQe3aSWrHNSu3XBY7hTBCt080evBqYmkprWHWsF5cxyfQKUT8hdT5AXkyIx+4JkDSFE01BE39KTH726CpzV6ppoe4L425cal9Y2RCX7wFvNf1W1W/cb3PKeYEZmI3ndXXdBl/ss8f9QU2unYo4p3laU4ebo0ak88o2YDZUEKTMorpRPMxFSjF09QqXcOdh7Tgb37S0UPyM2HtPOY1zQfaC4UlAos5CekeWi3WnYf8eV5+oIuz5QhcWSeAaj2wA34CfiJmBsgAAT15PcunpBc6A= 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/14] writeback: don't call mapping_set_error in writepage_cb
|
expand
|
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index aa3b432f77e37a..06afba8f078515 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;