Message ID | 20231222150827.1329938-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 67713C41535 for <linux-mm@archiver.kernel.org>; Fri, 22 Dec 2023 15:08:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 795F86B007D; Fri, 22 Dec 2023 10:08:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F7136B007E; Fri, 22 Dec 2023 10:08:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56E546B0080; Fri, 22 Dec 2023 10:08:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 433F16B007D for <linux-mm@kvack.org>; Fri, 22 Dec 2023 10:08:35 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 15BEBC085A for <linux-mm@kvack.org>; Fri, 22 Dec 2023 15:08:35 +0000 (UTC) X-FDA: 81594785790.28.850DB16 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf26.hostedemail.com (Postfix) with ESMTP id 6D41B14002A for <linux-mm@kvack.org>; Fri, 22 Dec 2023 15:08:33 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=eW2Uy2m7; spf=none (imf26.hostedemail.com: domain of BATV+af923ccb694ecd533eae+7425+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+af923ccb694ecd533eae+7425+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=1703257713; 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=fN/ppIDjf8llE1R2IP9HkDxKkqwH+tE6Rl+QLZ2/TEU=; b=hyDpvM9VuAP7AEvHOAeySzw1/DiUhZvukzIfrpvlw/jZW2WsrF/M6Q2JTSLBz72i8aUKJ1 uz17bIrWq+fZcEp9wnqVYquSh9oWKN05erp2kfQJ+m5jFAe+8LWrEVFa1ui4b3ywJlCKPl iM6x55Gh++Ig8O4kNK04Dyiv6NamtZc= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=eW2Uy2m7; spf=none (imf26.hostedemail.com: domain of BATV+af923ccb694ecd533eae+7425+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+af923ccb694ecd533eae+7425+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1703257713; a=rsa-sha256; cv=none; b=EsPfO9Q9i6wO8uJhrNTx+Ihjl3lNM9oJzjlfXwMtAbdlo/sAzEqjQS9Mjz8CT+dOrHhsSD SAnh1clAnRYW1rw0qym8B3SE3hmRBJnZnt2p/ZyPsp9xZfKR9rBfeETP/pe22kXhxwJw/8 UnNPrTyZ0Z6GfuTrIy2hYUUmKmwmIzk= 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=fN/ppIDjf8llE1R2IP9HkDxKkqwH+tE6Rl+QLZ2/TEU=; b=eW2Uy2m7FBO5xaNthhnztdQcks hrr4l0624Om9pIxbz9CvVT6F8/8GtvMNoXbmwGlCDFF8nGnq5VDQOhY68QwmxCcNbw02AiezjLC+h LciBMuT9iTN3DQKZJHLpSWtmgUBo1N6gBdfQ80vxoMRYMIFbnLv7rZkdvcE13PbK+RLrfJxZ6V/Wm NaEoaC6tJ3nXJN0Gfu7VKwYethnw5imyEeNqEF8c7//UPkIYO6NwJMsmMjN2v5/e76lJMEddiOmLy RQMKELa4SOwk1keLw5zIhtdwJ6WKunryCLuXgV9j0hnVCbu+3sDisXU0HwhYEHJuIKUDxvODk0o+Z CSzgEfwA==; 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 1rGh8a-006BM3-0e; Fri, 22 Dec 2023 15:08:32 +0000 From: Christoph Hellwig <hch@lst.de> To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>, Jan Kara <jack@suse.com>, David Howells <dhowells@redhat.com>, Brian Foster <bfoster@redhat.com>, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara <jack@suse.cz>, Dave Chinner <dchinner@redhat.com> Subject: [PATCH 02/17] writeback: also update wbc->nr_to_write on writeback failure Date: Fri, 22 Dec 2023 16:08:12 +0100 Message-Id: <20231222150827.1329938-3-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231222150827.1329938-1-hch@lst.de> References: <20231222150827.1329938-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: 6D41B14002A X-Rspam-User: X-Stat-Signature: 13gd7shao7gocuc3z1ha5dfbxskawwuz X-Rspam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C0dF6/PprBeXWIQucj//XgoNkom0ZrWcr/W7JVKuZyy4MEgU43Qhq7tGAukP5KmSKV26WPEzoIpLfnZ02Y2cqW1IZq09LIQeFO3sOFc1uV05u/lPlGgbIpQIGZFMZ/0R4cnK9s+HYdPv4D0/2y2QcIA961TOxPoqDOQPt1vPPPcPIjOFTZfR661BblyFwzMmWKKLk9yXxDdhwlooeFm3bKb7nBO/g1e+GU94LzYzVNrrPqANhPgPQKx+/Q7+bMOmtrNQWrc2fvKci9ln8lga3DqNKb3B4AMINP6TVYTdtP65Rvyw5RO/BmDLFB9Ip9Plax7+dY6JJkx5xYP72IwUxdb+oHZiu59iavD3HHj1TJmTx8YEt1tOtxBJBzm4aTUY/QaXEnKpuNmR2ECBXDOXIPdVUrTnMlnOYOSQ4xBu/QffkYACmfqXyB70AKDFY= 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/17] 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 b13ea243edb6b2..8e312d73475646 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;