Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4236205imm; Mon, 11 Jun 2018 09:03:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIXXwwP8oeRASiPRF5BWq/cgA+6t6oQ3sRFfx+jyWeH7sEnhBmggUJ76hYk6M4GSQPNpNKf X-Received: by 2002:a63:6106:: with SMTP id v6-v6mr15270375pgb.441.1528733001273; Mon, 11 Jun 2018 09:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528733001; cv=none; d=google.com; s=arc-20160816; b=RxxK22W1b2eblbWvHSMb2aJdvuW+NZ5LAxf1yEjpNt7a5bEq5NpNe+0vXcEBkUBGv7 YpzKdxWFDoTRVze+cMlpRuYCZ2KuGszsiYVRN5YZc1tTIJ2zMLTghUCB5qSN/lqHz02Q mHmjfQ2E787jaBSPpoa2ObB67lEtYqu8LaXRqudJFQ9MEGJ2hly2xRHnDgvsSz8iUjFG 5FhK57XItKTd5fYurjtj3OGoXAhZKwmaAD5U0JqyMgL8k8NnrIsrdtb8qxBmwtmO+pm2 v4xWmwNtu4mLusDGOAkI6w3JNXW4top8mWJVZ4A9XDYutvzaNT2yX+1uiwFAYFteGYfz EiWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=v9f28GFQA2H3oC5e4oSJdUQ6ulwZ8LP6rBgFxUSnZbQ=; b=oKugJ1y3q17shgwwfS4JFzqjgzJEyNPfozIfE1uWytxiz88z0i6z2Ri372FN6/8n9X 1kId6u/RxuAHlpi2gU+ZyVhJTFAoQaKWClOzSF6p4pdCKENAf0in3ObWBzU9SFxcyUph 0h10FrQ9khwdkkZhMVjPDRfjNcxyHQ8v/leyavvvOFbWl8FAffuIttpTGi3ocDaH2wyU shdbaLx+o9i+1Oqz3L0PeiHjTDwGRNl50EmEW6Q2VuhVcqUbY+OZ75jp5GD/mGxOPqaM 7JbFgcNiplD5OdpqthvS4Bpzs3enDjLoXWBmqe6pGvr2bTiNo+2MQSwzHjlOY5FigvC0 K0XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=NVzQ8Jfb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o11-v6si23703872pls.234.2018.06.11.09.03.07; Mon, 11 Jun 2018 09:03:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=NVzQ8Jfb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933702AbeFKOHX (ORCPT + 99 others); Mon, 11 Jun 2018 10:07:23 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46378 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933619AbeFKOHI (ORCPT ); Mon, 11 Jun 2018 10:07:08 -0400 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=v9f28GFQA2H3oC5e4oSJdUQ6ulwZ8LP6rBgFxUSnZbQ=; b=NVzQ8JfboRksaatDhR28UyFzc srz+6VG06sLl8lXo52AjSVvyVjf3Krhrw5S5I22lVVv3BcQUWGWVG8d8qXwqCWJoOG/LbcJAKozXG mRKklXRrOp3wuV/V6LLLKJsMXubcj5XqlDffWb6LTYwdRF6UlXBv+IaCZJWZ6mNMe6pn5+5LqJn1v qhm4C663AbDtqbaw6TlaRxjkqxtCoKc5WiDoXSw3Xvvbhy8l01lcSXJzRfx3v1P5YB2mlGjTX6729 O+5ggehLYXDd3tbCqvLxq9OciF0I3+8r6EG1jaRFfBA2MxiAQTB0I8eBGTCNX2jcg78fFNnMy+1xO Jn3yU3Ozw==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSNTP-0004wo-6u; Mon, 11 Jun 2018 14:07:07 +0000 From: Matthew Wilcox To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Matthew Wilcox , Jan Kara , Jeff Layton , Lukas Czerner , Ross Zwisler , Christoph Hellwig , Goldwyn Rodrigues , Nicholas Piggin , Ryusuke Konishi , linux-nilfs@vger.kernel.org, Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH v13 56/72] btrfs: Convert page cache to XArray Date: Mon, 11 Jun 2018 07:06:23 -0700 Message-Id: <20180611140639.17215-57-willy@infradead.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180611140639.17215-1-willy@infradead.org> References: <20180611140639.17215-1-willy@infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthew Wilcox Signed-off-by: Matthew Wilcox Acked-by: David Sterba --- fs/btrfs/compression.c | 4 +--- fs/btrfs/extent_io.c | 8 +++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 8db29f791984..1d051d841cb7 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -444,9 +444,7 @@ static noinline int add_ra_bio_pages(struct inode *inode, if (pg_index > end_index) break; - rcu_read_lock(); - page = radix_tree_lookup(&mapping->i_pages, pg_index); - rcu_read_unlock(); + page = xa_load(&mapping->i_pages, pg_index); if (page && !xa_is_value(page)) { misses++; if (misses > 4) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 489fe673fbba..115ff9777364 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -5286,11 +5286,9 @@ void clear_extent_buffer_dirty(struct extent_buffer *eb) clear_page_dirty_for_io(page); xa_lock_irq(&page->mapping->i_pages); - if (!PageDirty(page)) { - radix_tree_tag_clear(&page->mapping->i_pages, - page_index(page), - PAGECACHE_TAG_DIRTY); - } + if (!PageDirty(page)) + __xa_clear_tag(&page->mapping->i_pages, + page_index(page), PAGECACHE_TAG_DIRTY); xa_unlock_irq(&page->mapping->i_pages); ClearPageError(page); unlock_page(page); -- 2.17.1