From patchwork Sun Jun 17 02:00:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 10468295 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 0E284600CC for ; Sun, 17 Jun 2018 02:03:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F405828409 for ; Sun, 17 Jun 2018 02:03:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E81EB284DA; Sun, 17 Jun 2018 02:03:31 +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 9A3C428409 for ; Sun, 17 Jun 2018 02:03:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 52DBD6B028A; Sat, 16 Jun 2018 22:01:23 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 48A256B028B; Sat, 16 Jun 2018 22:01:23 -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 2DF1A6B028C; Sat, 16 Jun 2018 22:01:23 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f69.google.com (mail-pl0-f69.google.com [209.85.160.69]) by kanga.kvack.org (Postfix) with ESMTP id D8B3C6B028A for ; Sat, 16 Jun 2018 22:01:22 -0400 (EDT) Received: by mail-pl0-f69.google.com with SMTP id p91-v6so7641382plb.12 for ; Sat, 16 Jun 2018 19:01:22 -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=yhxlc91nQ8tv5+dbe3KldhL1aWJiFQRriK/2+uk71C4=; b=j57xhwb/h5zjqiS4nf6+n+ykvZxs3ITK24QVtQQPS0z4qHOUAVa4q19HRzm6YkGFaG 6orSyTsg2cD3oWBcK3xpgrk4nU7FfL8+jycAcy/m5uYIumjyiyyaLOR/ISoAmO/jpRIc wI3soccNXwetUi/L6YHe9jFMdjCZ+2zVutNRnqcIcMlT5K9ZKlL6vrBCPoNlr/8c5zGL yPkboSVnqQMMGlEUSJeEGz0VFiOUG/qQGCeFjlnYNE9sFfH3t0QkNPDp0qSEk77NJmWm jV4jaG5j+pp6hwzPffFEmgfdJpywCApo3bFJk2febda7+SBxNBWSbOb0IVXXyZJmM55W i0xw== X-Gm-Message-State: APt69E31aSXne+kwK7Vnsjm7KC4VtpxghT108X1MTQ7cOauuVxvRVE55 3uptdMg7XhqLVynVy6gRJYk6r436oeN78AemCVNY8+Yy4WTO8/tjWDJ6/RLT/1EtLeJ78VZoBbQ WYW36KB2rPpM1mD/bJzcegXWxRZ03nOldTg2PwjBXqWVFj+IXysFqa/vYK/ItBn3hKw== X-Received: by 2002:a62:a0c:: with SMTP id s12-v6mr8146631pfi.33.1529200882581; Sat, 16 Jun 2018 19:01:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJxQg17dlUP41CBqevNC2mH9ZiaDYYeGgVGSGT4PjNe9PV5WbY0S177B2nSazDTqoOihgF3 X-Received: by 2002:a62:a0c:: with SMTP id s12-v6mr8146584pfi.33.1529200881600; Sat, 16 Jun 2018 19:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529200881; cv=none; d=google.com; s=arc-20160816; b=OXPBHAQbg8IJsuz2cA3plttgbwfJ823ti01etj9m3ds7kfC5ZfunyLTxiBLh/1Tvjx OYw+0QMh4Acu2liX9l4/2q7rdL/fOXv2dJtwkKDSLC8eiyWLd4J01WMAbXjQSXYYijo1 G1rvVcYKoS8Eq7ab2W/TH97+3Y/Ci70vmiYfNwexdFbqaSHUpck/jFm40pW8ttM7pfCw fb3y5rI9oKIu4Am9JdCxxR7u3C+H2abYCe/CrjBs2lKRoOMU5tGKfQreTULKjT/F0jXS FOW5r5VJwB9G9QYijooppIg9y1t79jduqw7mjqNC8k77TwVPuK3C5fjXa2ZIt3YH+wuU QCpw== 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=yhxlc91nQ8tv5+dbe3KldhL1aWJiFQRriK/2+uk71C4=; b=FugcjCVPe9VtCCkPb8BNdctzQd8VESnfWXO+3Q0MdfpgttLHKf08jXKycBHtI3oqGW INqrmhACaqNlP++fAnDcpKCBTPb8V8ZxhSNoe3zF16prm4dXwj6lWvQm4myXkCiflYjg PvssZ+MPOGsDUyXdBXt/r4iRKNCVdSC7l3tZ/nd9WmZNBDQ6p29is4DoCLs5Iw0e3SiS DZU11xYFub9r7Z8a9KgFtlr91AJnSDerbCKFA2qccfaI0B7nf6FmqrejB8tl0euZLHd8 lYkHGi0MyQ/+JggkFVtys5G8HGmPArp23zs6WKpdkcQGjZ8NqE0B5j10BiKYUwaD+Ie9 HOmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=ATucbrbf; 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 h4-v6si9422165pgs.201.2018.06.16.19.01.21 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Jun 2018 19:01:21 -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=ATucbrbf; 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=yhxlc91nQ8tv5+dbe3KldhL1aWJiFQRriK/2+uk71C4=; b=ATucbrbfwI0IsSz7beDJkwGfs aQC8Jv/mKj1RIou0S87kzCtyg9yAbWH0XE7KCCgysQll2lwI9+wCSQKsw+EucYOoyNi/eW/aAtKjH wmtGkLAfSA07OTdtqYdVft/K3GIIZFFql5OZ1/wmIo8gjVlE1MBTDH052+4mxJ1M7mgkxLWN9OQji KBOZGbZfrYuF7m211usY/1URfkjUmgyS8oNF7Zt2iWa8/Gg6on77Jg/CmHSi9aTRkzTZfd0hJmURi o34d10EALJHLzKsTEgSFB6UqTPpiEGlBDk6ww5mOR3P9zIzgmbmQsnturAFQrOZyG63E/Ag9C7PHz iuT4FWvpQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUN0H-0001Sq-Bg; Sun, 17 Jun 2018 02:01:17 +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 v14 57/74] btrfs: Convert page cache to XArray Date: Sat, 16 Jun 2018 19:00:35 -0700 Message-Id: <20180617020052.4759-58-willy@infradead.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180617020052.4759-1-willy@infradead.org> References: <20180617020052.4759-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 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 ac105d97dd81..e97aec67f52d 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -5169,11 +5169,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);