From patchwork Mon Jun 11 14:06:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 10458005 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 6C9276020F for ; Mon, 11 Jun 2018 14:11:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59F12285E5 for ; Mon, 11 Jun 2018 14:11:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 574F6286B4; Mon, 11 Jun 2018 14:11:28 +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 35AFF285E5 for ; Mon, 11 Jun 2018 14:10:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B6D446B0298; Mon, 11 Jun 2018 10:07:09 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id AC8FB6B0299; Mon, 11 Jun 2018 10:07:09 -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 96E256B029A; Mon, 11 Jun 2018 10:07:09 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f72.google.com (mail-pl0-f72.google.com [209.85.160.72]) by kanga.kvack.org (Postfix) with ESMTP id 335076B0298 for ; Mon, 11 Jun 2018 10:07:09 -0400 (EDT) Received: by mail-pl0-f72.google.com with SMTP id 31-v6so12218121plf.19 for ; Mon, 11 Jun 2018 07:07:09 -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=v9f28GFQA2H3oC5e4oSJdUQ6ulwZ8LP6rBgFxUSnZbQ=; b=fXi2nME7jVVJavuPe4z1l2vCxqxaUQ0eHjRF4cctTJUDoGumIWRh8856VYstKxYq93 npyTsE52gk43lkg32rPGo9hyxVPf9aJMLENrWjnB6x+cGFDmIsyjQBSwHkknGGUk8sCf aoKjZC6+OmRGB8U9gIuRkL+9Dk665Kfwhmtnse/zGB7NuC4vvCPhhZjBy4IeLDYIVx6v DVedfJJ3QGhcsOuE3nmv6x/nSdXFjUfhKmbTcUvASIwB4Ka4HEcEuWMDp5V9Dk2j4HUc Yrr7cD2Iqtm2A/gNyrFzEvM+5rdUkN3sGp3XnB5uV/XaKW0icAtR8X1pABrZDJflzNYX B22Q== X-Gm-Message-State: APt69E2EPTCFzvrfJHdqKnvpwp7vOoBjvquvX+MkW+CGOtec2kicD9RS OnvltGWo0OpxGSUncIkjuRLE/q7wwcYiq8bNGfdtCNZg9FgQQxQ7kRlv9W8yxo+PlT2f9JshDYz 7RpwdGwbD0eZbqVtEq8dPyPf9sNSs4/YNZEFTdfYkRtpvHQepWR0PGciL3i5MgpZCDg== X-Received: by 2002:a62:918:: with SMTP id e24-v6mr17412142pfd.30.1528726028908; Mon, 11 Jun 2018 07:07:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKv0xrYq2NLrBo8zT2/zO5+0wePqfbDSyA/EtAdQDg/MD6tNehtZtSVt2YtRMBjKj2c9zIZ X-Received: by 2002:a62:918:: with SMTP id e24-v6mr17412082pfd.30.1528726028083; Mon, 11 Jun 2018 07:07:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528726028; cv=none; d=google.com; s=arc-20160816; b=PIGP1CNYYo9iShuk7tKtxHumQkvx1D++mXJgELD2oAu7aNV6fFoJQi8HeukaY+4vV+ 8fv8bijjuPLZwtRpW9WJGfXKhbX5XV3BbMqbm7h3kIt4fgEBeKJTearrqNxodU/gzVru NI77U1HkIMSeXKdR485uViIxo1oLPg3f1QKHKiVbnIZrNV+Pi7dxX6ZStKLaqUfEWDRB D6ubx3NlcKvEwxPrSk3ADpjn4D7aDFhBqChSPdZ87jl6tZAj9rG0l999qM3q9bRkUBNT JtOjckEjVcUanwQPzHP2hnzWO3TA/t2Pffl0HToB+v65odGxm+NjcaYiqDanRLA6PY+S Cu6g== 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=v9f28GFQA2H3oC5e4oSJdUQ6ulwZ8LP6rBgFxUSnZbQ=; b=PHskd5FYlUu5dWurND4u+ENPy/fEs2iv4bNzmXAwA9LK7IHw7P9i7op3JAdMa6L97T nGW85G5E0B2Zs33ecfRZ/Ku0crYHhB20tPcCDfuZGywcJIJzhurW7fYpOxOPiM6MC1cI 6ghNaNxS34FbCKryTSun0C0/nrco0NR9g+7ELLivmvbJ/OPk8ZClrxKFXWCmoj6hNci6 LiWQgn146/mOkeC65uk8UJJAYI+L9JFVMn6KboiSQr12eq8s9yxTQblXC0yT8mtfxf4d ZnO/2XdokrXU7pfeLb7BQdeAUPLh3ELra/wq6/EdExYX+jTfpIdCEsz14WFKYZSRN7UK E7HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=NVzQ8Jfb; spf=pass (google.com: best guess record for domain of willy@infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=willy@infradead.org Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id m2-v6si50906521pgs.349.2018.06.11.07.07.07 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Jun 2018 07:07:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of willy@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=NVzQ8Jfb; spf=pass (google.com: best guess record for domain of willy@infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=willy@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=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> 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 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);