Received: by 10.213.65.68 with SMTP id h4csp352856imn; Tue, 13 Mar 2018 06:32:42 -0700 (PDT) X-Google-Smtp-Source: AG47ELvgBCDAEXn6Te691ZLdEJ506bSpDtwN/wW9DR+VAZhql0wt2smXnuLFTAuq1w0VY8r4MeNJ X-Received: by 10.98.155.194 with SMTP id e63mr625583pfk.95.1520947961951; Tue, 13 Mar 2018 06:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520947961; cv=none; d=google.com; s=arc-20160816; b=J1gklvslkbmXG0o66VUNXMZHibQ89gzyz2ZvsJt4W3sDfDPyvgXIH9LiH6aIlHyFDr 8oNNXD0codR4PnqJFaNTTB/yTdAFEdl95tN4Hw6g+hZYJAA+N2F5V0vqEZjBnpo9BO2A D/N7actJclKI/uXrM2dVTpG/vmssHlsz1Al1YetgvPugv4QgnoMfplxbEDLNpcYk+Ap+ WcEVjt6Afr/KujIjw/fYCLrsJcKpgs0SKZqY08nG9s1WQpq9NAtNbOzZAeZlRxUKtAq7 sBzZDSV5rROvWTwDdktUFnNA3H5nL0UNaq0pxBLh8mWz4ffM+zCuzKEFWv9yhO7f2p1J Ux0A== 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=kAQ0MsAETEgPCc80Tmqgp3OKH9ML3eJpVOU3moWcVzc=; b=m6G6RWcEtcDpnN2kmHpACL/DzjBnBedP7EUZIdYFFLUoHfE9o+5CPdUj3glWK+ae/H lPixtoSc1H86+Y4xifkAmCz4hMkA2gk8c92Nzb+gE4SkhZmMNzh08pEUEbqi3Cpo6AS3 cIowxVAoAxrpyW1ky8U+fprp48TioDoYWy4e8ro4p9gu8HiDlAu6q8RE4LKemCuWqB95 C/7wf3dMrXgJYuZQqGldm+3zyqgg23Ob8lDyIv+pDlwGkqsLIJ/w0tZ9qQEaqKmPJWod NPDKXoTN1/U643Wa9HO0977yOdQR7hXYM6k5Z80fxb5GJpyiZCDAh8W0R6ZuMGzothjk 4bZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=dkLuw2l9; 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 5-v6si132989plf.396.2018.03.13.06.32.27; Tue, 13 Mar 2018 06:32:41 -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=dkLuw2l9; 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 S932970AbeCMNal (ORCPT + 99 others); Tue, 13 Mar 2018 09:30:41 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35584 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932673AbeCMN1G (ORCPT ); Tue, 13 Mar 2018 09:27:06 -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=kAQ0MsAETEgPCc80Tmqgp3OKH9ML3eJpVOU3moWcVzc=; b=dkLuw2l9mM2uhOiYVO1GNBVIR ti+H18FvzN6WfJeYeUdy9A63Br5p0xJINmiVHNKa0CerhU2jGB4Fc60l+KC4k1CEqOkxtzXazBBnZ UoSfgWlz/qfH839iosDzdC3Jrk2I7H+f3/sxyGYscbvve2mCoP5DOZwC1KY1j52jnleVkWsHrPYAj 2LgsRZmnfUbS1d/Cy+xS2eNKJ0ok0At3g1D1/9GnaMYtiRFij21wQ9Hh50u+FZKpNjpFzZDHoJ+Wu l/3FS78X8iDgy7NFDXyNRCUkENmoUkknDE9ryKtEW1ehySb7UjY6DmVRyvdvdQBkB0fxHBke0ISsF KPfQSiwEA==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1evjxJ-0004mI-Bh; Tue, 13 Mar 2018 13:27:05 +0000 From: Matthew Wilcox To: Andrew Morton Cc: Matthew Wilcox , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Ryusuke Konishi , linux-nilfs@vger.kernel.org Subject: [PATCH v9 53/61] btrfs: Convert page cache to XArray Date: Tue, 13 Mar 2018 06:26:31 -0700 Message-Id: <20180313132639.17387-54-willy@infradead.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180313132639.17387-1-willy@infradead.org> References: <20180313132639.17387-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 --- 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 ad330af89eef..c2286f436571 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -457,9 +457,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 bcc24ee5a2c9..edc472b41037 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -5170,11 +5170,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.16.1