Message ID | 20230104211448.4804-16-vishal.moola@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 106E1C53210 for <linux-mm@archiver.kernel.org>; Wed, 4 Jan 2023 21:15:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 330498E0012; Wed, 4 Jan 2023 16:15:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 29A598E0001; Wed, 4 Jan 2023 16:15:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0BA098E0012; Wed, 4 Jan 2023 16:15:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id ECBC18E0001 for <linux-mm@kvack.org>; Wed, 4 Jan 2023 16:15:19 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id CB470801B0 for <linux-mm@kvack.org>; Wed, 4 Jan 2023 21:15:19 +0000 (UTC) X-FDA: 80318372358.13.E96A6F0 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by imf01.hostedemail.com (Postfix) with ESMTP id 217014001A for <linux-mm@kvack.org>; Wed, 4 Jan 2023 21:15:17 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YYuOdit3; spf=pass (imf01.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.171 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1672866918; a=rsa-sha256; cv=none; b=udi0l69MvRCehZCQRSqt4QA+ao0WJoceliT0pVstZXLmdn5Zz4apgN3zYignTykVQgrzUd 3o5RiNrBDEVLjAtnjxNqlfDH5v2QICkukVtDDSonXv2MQJZeyG4+H2cVbyiMPvDZZIgIvE Y6xe0nHWllqqYgkVyf5U2F7w+f+8nYY= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YYuOdit3; spf=pass (imf01.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.171 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1672866918; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=HZ+AsMarClzul4w07hpaKmVXDP421VTrEgQP9XGRZto=; b=3SnH+neApsPKUln/N6os/T0NBHuVpH0WjwUbNc3z2HY3bQvHjbg1r5Mnkykr1TrSFIe+a7 mIInf/ZsOwAaRZoCxJ/LUsVJbqo+KWrC90S9bFr258nJPPMtDDRaz3q+vjYT2/mtfFYN2d Nkp3XXDMLIfP8KanNjQEo6hkppwuRC0= Received: by mail-pl1-f171.google.com with SMTP id g16so27542766plq.12 for <linux-mm@kvack.org>; Wed, 04 Jan 2023 13:15:17 -0800 (PST) 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 :message-id:reply-to; bh=HZ+AsMarClzul4w07hpaKmVXDP421VTrEgQP9XGRZto=; b=YYuOdit3NxbNrQLvQKQzYy9fInjz8epNnsAie9l78qOZwItZ1q9762RHvdjHvn0w3T Itev/qVCegvvtOsHjlnt/i8oYcY6s8Pbft4yn8UlU5hO8ANcihMCzw6L7clWMBVNlkml DdVTstYmIe6uBY+QKphA7A0vNicwDIZfmnlRaGywuDcd3L/Dz6ksmUjm69PNaduiwT0y oDarQ2Aeh8wlIFX7joZPiMSA82+zZJyehOMhZmZgTN7kokD4EtjK7YG4/3QTFsugmOWW sUQ8oex28ZiETO1YVZLLNiEuF950kwCKMCnU79wH/Yyl7cH+rVKP8QdTlOWRApZ8hx1s Ciew== 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:message-id:reply-to; bh=HZ+AsMarClzul4w07hpaKmVXDP421VTrEgQP9XGRZto=; b=F1sKaBWPuKrP9a5rXbmPmIDcfDLdq+P5ypMqTdjslP46098urOYGHSnTOIcN2W2Be8 +CrFhV1NBhnUfyr8TtBXMHxp1tCU445BuPoyMa1v5brLIQxaP+8AivBep7C42g6BPOXp LusF99zv+pdf9d/gJ3hC/IzP5bIEvhycTevO/94oKNfDtcw+GDS9usz8SssZQ+1/lGcf uPvdWx2ZYhM7lPSqEn7RK6lux56n88LIFlUQ3vwLdz69rpNUinq2JZYPIUIlG6CQv2NM WY4vfcGF+ugENQWdjCxp7/f7Is8dJ5WUbmEYVBIBvZejZ3+y44vuyeJ2MWn33uVN35/z Ilgg== X-Gm-Message-State: AFqh2kqYtrFHAU4GLhkjWBpFmCUAWO5P8YncgeosPiJSWMOqqMeo8cqZ 7B9IWbMgrU0OnId5Xesrts4= X-Google-Smtp-Source: AMrXdXtdY5GUpRFH0/rWB1ui6dE4PdO42I8quQD8+H41n2qV43RNlBpjdfLglYXYOXUh6D0WzIQFFQ== X-Received: by 2002:a05:6a20:429f:b0:ad:bd55:6dcf with SMTP id o31-20020a056a20429f00b000adbd556dcfmr72875976pzj.28.1672866917539; Wed, 04 Jan 2023 13:15:17 -0800 (PST) Received: from fedora.hsd1.ca.comcast.net ([2601:644:8002:1c20::a55d]) by smtp.googlemail.com with ESMTPSA id i8-20020a17090a138800b00226369149cesm6408pja.21.2023.01.04.13.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 13:15:17 -0800 (PST) From: "Vishal Moola (Oracle)" <vishal.moola@gmail.com> To: linux-fsdevel@vger.kernel.org Cc: linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, linux-cifs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-nilfs@vger.kernel.org, linux-mm@kvack.org, "Vishal Moola (Oracle)" <vishal.moola@gmail.com>, Chao Yu <chao@kernel.org> Subject: [PATCH v5 15/23] f2fs: Convert last_fsync_dnode() to use filemap_get_folios_tag() Date: Wed, 4 Jan 2023 13:14:40 -0800 Message-Id: <20230104211448.4804-16-vishal.moola@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230104211448.4804-1-vishal.moola@gmail.com> References: <20230104211448.4804-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 217014001A X-Stat-Signature: dtqkh51adqzouwja4jeq979du59pptmo X-HE-Tag: 1672866917-643484 X-HE-Meta: U2FsdGVkX18sRNlvI+czdVpF/8sl8RfgEt1/X6Bd5/G68i42d30FQlD+2I0hUlgonunqveO29bfHqavkrm/Nal5CqFH6PL+tCB2IaE817tn0du6qiporf6gEipq+MFHUShnIlrfs0MzGZB1XaS7BUIPPPfoOgKW+WuqTdOYBSeB4QEXkUjreasPOuunhGMkdywky7GOpiigMa6tIokFuawI8HVp2SX3uRKzkAtHWmuVAbqne6kbuhGuagMgF9txHjW4qLz7ynbfqiGvCHUb1hx1WIVEhV3LagCVVTFx0EiDOuL0n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.org List-ID: <linux-mm.kvack.org> |
Series |
Convert to filemap_get_folios_tag()
|
expand
|
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 51e9f286f53a..cf997356d9f9 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1518,23 +1518,24 @@ static void flush_inline_data(struct f2fs_sb_info *sbi, nid_t ino) static struct page *last_fsync_dnode(struct f2fs_sb_info *sbi, nid_t ino) { pgoff_t index; - struct pagevec pvec; + struct folio_batch fbatch; struct page *last_page = NULL; - int nr_pages; + int nr_folios; - pagevec_init(&pvec); + folio_batch_init(&fbatch); index = 0; - while ((nr_pages = pagevec_lookup_tag(&pvec, NODE_MAPPING(sbi), &index, - PAGECACHE_TAG_DIRTY))) { + while ((nr_folios = filemap_get_folios_tag(NODE_MAPPING(sbi), &index, + (pgoff_t)-1, PAGECACHE_TAG_DIRTY, + &fbatch))) { int i; - for (i = 0; i < nr_pages; i++) { - struct page *page = pvec.pages[i]; + for (i = 0; i < nr_folios; i++) { + struct page *page = &fbatch.folios[i]->page; if (unlikely(f2fs_cp_error(sbi))) { f2fs_put_page(last_page, 0); - pagevec_release(&pvec); + folio_batch_release(&fbatch); return ERR_PTR(-EIO); } @@ -1565,7 +1566,7 @@ static struct page *last_fsync_dnode(struct f2fs_sb_info *sbi, nid_t ino) last_page = page; unlock_page(page); } - pagevec_release(&pvec); + folio_batch_release(&fbatch); cond_resched(); } return last_page;