From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D8413C6FA90 for ; Mon, 12 Sep 2022 18:26:03 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1oXo8B-0005bR-DW; Mon, 12 Sep 2022 18:26:03 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oXo89-0005ai-9S for linux-f2fs-devel@lists.sourceforge.net; Mon, 12 Sep 2022 18:26:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: 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=HQUrfRdnfiMPUlTfezXhcqX7GV4m5M0rlOnnNapCheA=; b=B02cj0cO+FRwALo/DwQ7PtmwJO FTMYnuAJn7VGRIeBG4IqC+tWVfZFezmLcZVx5KrfE+/gse+KF/6h0A6JL/w5VqzCGMn7RGzB2L00H lKFNiWpO3Ed7cThkMBZBV0zz2yasNA2z/Plsz1otL6AJQaxwg9XCXA81iVQTaaCySZfE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: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=HQUrfRdnfiMPUlTfezXhcqX7GV4m5M0rlOnnNapCheA=; b=JRqscjD2Z1eYwoQI2AEjM2akT7 LeoMgeSxPvKExJVDIsYdsYn8eSSHat+9o0VCfd9lWaloS3TIfWBGwA+SUkn2yftiW5S6xN5kBIM6i rGEoWEoETwKCyTrmmYgWQAnwxSbNcyxRPrcJ0eJVWRywFfBGLQCABFo0tpwlJ/IPbolk=; Received: from mail-pf1-f175.google.com ([209.85.210.175]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1oXo88-0065RR-M9 for linux-f2fs-devel@lists.sourceforge.net; Mon, 12 Sep 2022 18:26:01 +0000 Received: by mail-pf1-f175.google.com with SMTP id u132so9430173pfc.6 for ; Mon, 12 Sep 2022 11:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=HQUrfRdnfiMPUlTfezXhcqX7GV4m5M0rlOnnNapCheA=; b=EWGIRsO0TQUjPA4NSpZhNtSF7U+oKW/75ivrprFYH3eLHknbNiJPBdeCKksthsDvHT p9VH4PtpUnMCZMAwx7DROHJWr7/Ah4rYynxtW5b0gtNTnCM4g+ZV4bimi/kEwOfXUOXL EXIuMFeQwxRjR7MDPmqZQPy8kFIte1xrKjKO9fkYlSO5ZAjVS/9lTh3/HcYUBxYfnCnS jffCNppR34pmyz4LTtsc95g9B1bfbwyW8e6tLM0fHOhkZ1IGhLZWN6p2Wmpdp9pivf+d BucUVnUqP/QnQXL7spYnWTmGi4J2gdTskcKPVzFxg/cASCQyhX2H2dZKyy9J1njNgD5p iMew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=HQUrfRdnfiMPUlTfezXhcqX7GV4m5M0rlOnnNapCheA=; b=RKWtANE8O0GBcZh5blfKCQJ0Dxbhqhp0W63xU7pDeh1LoBRCdx6yY2dxdzZTAeWgga WlSU/z5xWp4/y3XAuL3IaK1yCNt7IsmZpgIiccp6atE2wK8YsGzycW/H1K03bc4zPdgt lJanweFLpPpa+ANyfgJLW6ZfBqUHk1Frow45nC0UOh90FiFbYzPxU+o//9Jd3frgshPE yW3NgYnyqE+NhK30uORS+UpyQyK2kmRwL083SnksySjrdfipPK/Zi6VUVa1bIKWRB4C1 ynjU9BsR0gF44ouFoKtw6Y600EBhhoeWaYfZCuZIYAo6W9pic+vh6kRz2usHQeA9D/GX cH0w== X-Gm-Message-State: ACgBeo0kfEK/BQMFhZz8TydS4ubiH8LdvaiBHB2HwTwWpqN0d+UfJKxc p1DjEsp0xsCY4zyn0fQRfc8= X-Google-Smtp-Source: AA6agR5zoGRPcJJ1BMErXHewDDt0vJdvoM167lmthDP3+E0KxFpRx9Na4XeqBQAsnEhH1ytuVdZJxQ== X-Received: by 2002:a63:5d4e:0:b0:41d:2966:74e7 with SMTP id o14-20020a635d4e000000b0041d296674e7mr24037987pgm.526.1663007160214; Mon, 12 Sep 2022 11:26:00 -0700 (PDT) Received: from vmfolio.. (c-73-189-111-8.hsd1.ca.comcast.net. [73.189.111.8]) by smtp.googlemail.com with ESMTPSA id x127-20020a626385000000b0053b2681b0e0sm5916894pfb.39.2022.09.12.11.25.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Sep 2022 11:25:59 -0700 (PDT) From: "Vishal Moola (Oracle)" To: linux-fsdevel@vger.kernel.org Date: Mon, 12 Sep 2022 11:22:24 -0700 Message-Id: <20220912182224.514561-24-vishal.moola@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220912182224.514561-1-vishal.moola@gmail.com> References: <20220912182224.514561-1-vishal.moola@gmail.com> MIME-Version: 1.0 X-Headers-End: 1oXo88-0065RR-M9 Subject: [f2fs-dev] [PATCH v2 23/23] filemap: Remove find_get_pages_range_tag() X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-cifs@vger.kernel.org, linux-nilfs@vger.kernel.org, "Vishal Moola \(Oracle\)" , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-mm@kvack.org, ceph-devel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-afs@lists.infradead.org, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net All callers to find_get_pages_range_tag(), find_get_pages_tag(), pagevec_lookup_range_tag(), and pagevec_lookup_tag() have been removed. Signed-off-by: Vishal Moola (Oracle) --- include/linux/pagemap.h | 10 ------- include/linux/pagevec.h | 8 ------ mm/filemap.c | 60 ----------------------------------------- mm/swap.c | 10 ------- 4 files changed, 88 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 85cc96c82c2c..b8ea33751a66 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -742,16 +742,6 @@ unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start, unsigned int nr_pages, struct page **pages); unsigned filemap_get_folios_tag(struct address_space *mapping, pgoff_t *start, pgoff_t end, xa_mark_t tag, struct folio_batch *fbatch); -unsigned find_get_pages_range_tag(struct address_space *mapping, pgoff_t *index, - pgoff_t end, xa_mark_t tag, unsigned int nr_pages, - struct page **pages); -static inline unsigned find_get_pages_tag(struct address_space *mapping, - pgoff_t *index, xa_mark_t tag, unsigned int nr_pages, - struct page **pages) -{ - return find_get_pages_range_tag(mapping, index, (pgoff_t)-1, tag, - nr_pages, pages); -} struct page *grab_cache_page_write_begin(struct address_space *mapping, pgoff_t index); diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index 215eb6c3bdc9..a520632297ac 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h @@ -26,14 +26,6 @@ struct pagevec { }; void __pagevec_release(struct pagevec *pvec); -unsigned pagevec_lookup_range_tag(struct pagevec *pvec, - struct address_space *mapping, pgoff_t *index, pgoff_t end, - xa_mark_t tag); -static inline unsigned pagevec_lookup_tag(struct pagevec *pvec, - struct address_space *mapping, pgoff_t *index, xa_mark_t tag) -{ - return pagevec_lookup_range_tag(pvec, mapping, index, (pgoff_t)-1, tag); -} static inline void pagevec_init(struct pagevec *pvec) { diff --git a/mm/filemap.c b/mm/filemap.c index 435fc53b3f2f..b986f246a6ae 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2309,66 +2309,6 @@ unsigned filemap_get_folios_tag(struct address_space *mapping, pgoff_t *start, } EXPORT_SYMBOL(filemap_get_folios_tag); -/** - * find_get_pages_range_tag - Find and return head pages matching @tag. - * @mapping: the address_space to search - * @index: the starting page index - * @end: The final page index (inclusive) - * @tag: the tag index - * @nr_pages: the maximum number of pages - * @pages: where the resulting pages are placed - * - * Like find_get_pages_range(), except we only return head pages which are - * tagged with @tag. @index is updated to the index immediately after the - * last page we return, ready for the next iteration. - * - * Return: the number of pages which were found. - */ -unsigned find_get_pages_range_tag(struct address_space *mapping, pgoff_t *index, - pgoff_t end, xa_mark_t tag, unsigned int nr_pages, - struct page **pages) -{ - XA_STATE(xas, &mapping->i_pages, *index); - struct folio *folio; - unsigned ret = 0; - - if (unlikely(!nr_pages)) - return 0; - - rcu_read_lock(); - while ((folio = find_get_entry(&xas, end, tag))) { - /* - * Shadow entries should never be tagged, but this iteration - * is lockless so there is a window for page reclaim to evict - * a page we saw tagged. Skip over it. - */ - if (xa_is_value(folio)) - continue; - - pages[ret] = &folio->page; - if (++ret == nr_pages) { - *index = folio->index + folio_nr_pages(folio); - goto out; - } - } - - /* - * We come here when we got to @end. We take care to not overflow the - * index @index as it confuses some of the callers. This breaks the - * iteration when there is a page at index -1 but that is already - * broken anyway. - */ - if (end == (pgoff_t)-1) - *index = (pgoff_t)-1; - else - *index = end + 1; -out: - rcu_read_unlock(); - - return ret; -} -EXPORT_SYMBOL(find_get_pages_range_tag); - /* * CD/DVDs are error prone. When a medium error occurs, the driver may fail * a _large_ part of the i/o request. Imagine the worst scenario: diff --git a/mm/swap.c b/mm/swap.c index 9cee7f6a3809..7b8c1c8024a1 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -1055,16 +1055,6 @@ void folio_batch_remove_exceptionals(struct folio_batch *fbatch) fbatch->nr = j; } -unsigned pagevec_lookup_range_tag(struct pagevec *pvec, - struct address_space *mapping, pgoff_t *index, pgoff_t end, - xa_mark_t tag) -{ - pvec->nr = find_get_pages_range_tag(mapping, index, end, tag, - PAGEVEC_SIZE, pvec->pages); - return pagevec_count(pvec); -} -EXPORT_SYMBOL(pagevec_lookup_range_tag); - /* * Perform any setup for the swap system */ -- 2.36.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel