From patchwork Wed May 30 10:00:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10438285 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0DBFF601E9 for ; Wed, 30 May 2018 10:01:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3430288ED for ; Wed, 30 May 2018 10:01:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E84AA288F1; Wed, 30 May 2018 10:01:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EC16288ED for ; Wed, 30 May 2018 10:01:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7FAD16B0287; Wed, 30 May 2018 06:01:07 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7A8C56B0288; Wed, 30 May 2018 06:01:07 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 671BC6B0289; Wed, 30 May 2018 06:01:07 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f197.google.com (mail-pf0-f197.google.com [209.85.192.197]) by kanga.kvack.org (Postfix) with ESMTP id 24E366B0287 for ; Wed, 30 May 2018 06:01:07 -0400 (EDT) Received: by mail-pf0-f197.google.com with SMTP id s3-v6so10661946pfh.0 for ; Wed, 30 May 2018 03:01:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=D0KxzdpTuKvQMuPzvE/KV+d/OxGL8OWP8lPM4ImFbzs=; b=tQFH5aYfc1zeNpnfv13+XtaipfQV4M12kYsi2zk2h53NzzAxra5UHuN3dc2wR/Gn0w g96bI+yacC8JUfq7uiLaBwS85D4mU0zyww5ApnfUDelDKyO/dfTeoa2jrDVI1Kto0zTm HBxUsjVLQaPJk9vOtDK9lxt/QqT1wqF9hm+I/yMYce0vWq3/moOC7LkdMhAXi7lUBW4n H65yGzWTot9YfXwl08IMhCWvK/n3uukk+KvlgvIpkIw4Zj1Aso0aUboPeOMTPSEBqbUi t7klADMZ4Ae7OwGVxYukcRzVQl9hbr8bbMcBUNCcK+Dbs1jJeuNDWjMLhBVvwDLk318/ c4CQ== X-Gm-Message-State: ALKqPweEbNNYBtuD8xwQZNDcbqvAPm/YkGgWQDJrxuc91oONfAzKtFhR l+4xG9o43raJ2VruOJMC5wVIhutDBx0pXdh9a4bHy9FwlNGjZaxVNWcITQ6hj2vOpZ9T5da37Mh pdk63mPbMQ7basoanhuwioE+HOhg8JsadIEqJvj8/kEMA6OuidFH5kRl43cNxIUA= X-Received: by 2002:a17:902:bb93:: with SMTP id m19-v6mr2211915pls.123.1527674466859; Wed, 30 May 2018 03:01:06 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIVCVt09PuPXg1sc+F1GIVXwRQ45jvaalQyqmxSb/L+H+ZiD4e3mTPvWhaht2YmiYzOiWEz X-Received: by 2002:a17:902:bb93:: with SMTP id m19-v6mr2211856pls.123.1527674466175; Wed, 30 May 2018 03:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527674466; cv=none; d=google.com; s=arc-20160816; b=YHk20WMo3gRupEyCepPLdZdm6ZkddZggVoCvF1+xNgfA6YeV8cYyKkrb+gdLmrpSo9 CxQhYs4ol3RclXmpYeY2jAUTueQkesO/n7rj+HgDsV9qfj2TYMNXIWm0H1oGJdpeo/x5 jIXMWlGVufq0g21fwoEhlIC+tl7iaMzPcvU4+/eAfqpGs4mYhYE36d4N8nmrkwCsmalD D/F/4q2szjX1Yry8Szy38JuV7KUFUUMl/KJzDKhokv7KMktIhFl/sR2bmxqpkWXsuELk WW4DVbSO1p2neftLOFMbFBKh9tI+C4u5XejmiIiuvrNxoFkKa5V6QUXoUT6OEC5tOpxx bBUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=D0KxzdpTuKvQMuPzvE/KV+d/OxGL8OWP8lPM4ImFbzs=; b=EuixbOFZW6SlcBR2MzJw34haDWnNabb/tmZvw/CGnhWLAzvJwLjwARaQNBoUWKmgb6 5izj+rYQp8LrWNokO7RIrM9TdUvg0ElSHPyMiSJOYgScAyYCjNtyjntGCVUv38P19Brp VoYeoZAlNqN9Uj74WiFgrn47Ony/DLcU8jplA3e7qE3meqoW1lBUr89cFAwOk8Aj54sL Qf+WlXUGB55UIJwVT8HNgisoLfiEAr9AhhWqdbN6IYELAJOPjz7fTGusoRfGQUpUw97C 8ArKvMMl21752GB6wVjVIGawm5TMbWEZLtbA0gD9EsUo3ijnNSIJhRt5GpTDvhG0ITSD WnQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=b1kL8wrz; spf=pass (google.com: best guess record for domain of batv+1f4557cc97fec8e307c5+5393+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+1f4557cc97fec8e307c5+5393+infradead.org+hch@bombadil.srs.infradead.org Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id t1-v6si35331346plb.90.2018.05.30.03.01.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 May 2018 03:01:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of batv+1f4557cc97fec8e307c5+5393+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=b1kL8wrz; spf=pass (google.com: best guess record for domain of batv+1f4557cc97fec8e307c5+5393+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+1f4557cc97fec8e307c5+5393+infradead.org+hch@bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=D0KxzdpTuKvQMuPzvE/KV+d/OxGL8OWP8lPM4ImFbzs=; b=b1kL8wrzGTccWq4iugTSd3zoK 1jbam8ZulKq4Lr18TdawFNDz/Ej1UqCk0HkwnIjyjaY2eU/CjuQ1MsxnIXiNPfUpDvMr31pqbF2wQ b8x7CzHmAe31wfccBEteFio3i9+w/PEmD3enfzdanHwTnvbc1hVANPT/7aOYKsxFOFIbKijDZyKzk clICqUExbLo6zyBdREgvhABqOW+pXMjWrQtFVlHjzegnATweOGGVJiZ3bmlXF6j4cy4fkOhvClWU5 /f0poJlgnI1TdrQZ695Eb5+RbzqpKEOg8MKNdQDEpWaWQmNOZkDIft3OZC13CFjamWtEqd6wmHsoo qoXrD/vgg==; Received: from 213-225-38-123.nat.highway.a1.net ([213.225.38.123] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNxui-0008VL-4Q; Wed, 30 May 2018 10:01:04 +0000 From: Christoph Hellwig To: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 11/18] xfs: don't clear imap_valid for a non-uptodate buffers Date: Wed, 30 May 2018 12:00:06 +0200 Message-Id: <20180530100013.31358-12-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180530100013.31358-1-hch@lst.de> References: <20180530100013.31358-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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: X-Virus-Scanned: ClamAV using ClamSMTP Finding a buffer that isn't uptodate doesn't invalidate the mapping for any given block. The last_sector check will already take care of starting another ioend as soon as we find any non-update buffer, and if the current mapping doesn't include the next uptodate buffer the xfs_imap_valid check will take care of it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster --- fs/xfs/xfs_aops.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index cef2bc3cf98b..7dc13b0aae60 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -849,15 +849,12 @@ xfs_writepage_map( break; /* - * Block does not contain valid data, skip it, mark the current - * map as invalid because we have a discontiguity. This ensures - * we put subsequent writeable buffers into a new ioend. + * Block does not contain valid data, skip it. */ if (!buffer_uptodate(bh)) { if (PageUptodate(page)) ASSERT(buffer_mapped(bh)); uptodate = false; - wpc->imap_valid = false; continue; }