Message ID | 20221102161031.5820-13-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 630F1C4167D for <linux-mm@archiver.kernel.org>; Wed, 2 Nov 2022 16:11:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BFBBE8E000F; Wed, 2 Nov 2022 12:11:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BA9AC8E0001; Wed, 2 Nov 2022 12:11:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9FC948E000F; Wed, 2 Nov 2022 12:11:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 92DAD8E0001 for <linux-mm@kvack.org>; Wed, 2 Nov 2022 12:11:27 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 0942E803D9 for <linux-mm@kvack.org>; Wed, 2 Nov 2022 16:11:26 +0000 (UTC) X-FDA: 80088992214.12.6FF8E17 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by imf10.hostedemail.com (Postfix) with ESMTP id 97DDDC000B for <linux-mm@kvack.org>; Wed, 2 Nov 2022 16:11:26 +0000 (UTC) Received: by mail-pj1-f51.google.com with SMTP id k5so9131626pjo.5 for <linux-mm@kvack.org>; Wed, 02 Nov 2022 09:11:26 -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 :message-id:reply-to; bh=CuuU7Td+QUT919J1WnVrpHag/XTS8dO5J3B4LUD/nEI=; b=k4sYgtCTlKF9O5eHoAATqGO6DkAOPOB+/zWzhHb+mqOGd3qF7SgoAaKFi4lLVBsht/ 0a+GahnwrfYgcXzfcqjQMfMejC34Q/m1r6UggkT5/y5BwoQUSM/Inh109I0qpOE7qiZG VHSWVTYivN2nm8doYDi4kZvX7E+qWkNiB9Lrdy/A6STUjeM0jj3okY+N0rjKA3OWtndC 3sSdr2MVpV/CijFouW4jnz6JBqF5pTNSy78wF6PfERj1jNxM0lNUypdxS+HdwVF2Q1pa vL090y+jlC31ftR9kmfoc3DT021w95uO172fFY0HeNWUC0D/N2SjsKb0ohMgGDNyRVN7 /kgw== 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=CuuU7Td+QUT919J1WnVrpHag/XTS8dO5J3B4LUD/nEI=; b=uNkwU0jYwBFxYVZdA8wT8gCGtCr5AxWEQejFGVCwGT6Nzz4qpl1DPpMSf9DQHCnKxd uj/6JhUttcDieQHd41H63uMp2VCjwKjEqY1FK84Rq6sMTIbB9uUHFSujYdjC0EeB8RUC 60cDpfJNUIGr8xRkOVm/6FLx692vehSbcyoC4s3eijCn80944eCXOvQB5GXYQwXyVGxX USAGR3y3itYYgiQ8NsQ4BRbfc15i53rFgWxZ0Mn3GjbWbFb8hSmEjGv4RjW3OVzLFLEN H+ZUD7dv4GIf53RBfKVsZhDryijB1LTzwqJrLbER4Ub0p6biQGnCSpSPRSMbpKYwgLEd lkog== X-Gm-Message-State: ACrzQf3uMdU+1ExtJlEyc7EIOdH19ZzjgSnufRyy8UsCkFX382XAGljj I0gXoUmbMx5Ru1d5rnW/hvE= X-Google-Smtp-Source: AMsMyM6I93ORgky9kjhOIjyftY7R2MXJmfWgHu6+CPmBQIrkt50BHJL8QLvp13RkJJ928M5oxPKLmA== X-Received: by 2002:a17:902:aa02:b0:186:9395:4e82 with SMTP id be2-20020a170902aa0200b0018693954e82mr26138278plb.5.1667405485482; Wed, 02 Nov 2022 09:11:25 -0700 (PDT) Received: from fedora.hsd1.ca.comcast.net ([2601:644:8002:1c20::8080]) by smtp.googlemail.com with ESMTPSA id ms4-20020a17090b234400b00210c84b8ae5sm1632101pjb.35.2022.11.02.09.11.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 09:11:25 -0700 (PDT) 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 v4 12/23] f2fs: Convert f2fs_flush_inline_data() to use filemap_get_folios_tag() Date: Wed, 2 Nov 2022 09:10:20 -0700 Message-Id: <20221102161031.5820-13-vishal.moola@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221102161031.5820-1-vishal.moola@gmail.com> References: <20221102161031.5820-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667405486; 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=CuuU7Td+QUT919J1WnVrpHag/XTS8dO5J3B4LUD/nEI=; b=Q5eG8t7WYq902Gs3Gf5sshlG4+hxpHgMca5tomDs787ZJ7u8DhRE9z19SsnlBqQWT+hFhS aX0az+QnootO6iB0EA/eiFi1SerkRAttptBKHWeOHZktprfKHM2mrm76q7ivz1WP5oc1yV j/dKnvZKEvHY6YOX6rO6FPRBn6aldZk= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=k4sYgtCT; spf=pass (imf10.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.51 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=1667405486; a=rsa-sha256; cv=none; b=2IwkwO2CDRWhegKg0uEJqxQjCSflZcjPkNH783QhCo23Hsz2B/5TFZomiFse9F1h6J0+lZ 9iIAbnRKTG+4stvDSpAchoPIcvhRR6dZcskoQ0dR7Gw7qAb9CUjoHBgPVFq6nc0VZeNPH6 wx+dt2zAmQwGl7v3podgLR58+Tmgf2I= X-Rspam-User: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 97DDDC000B Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=k4sYgtCT; spf=pass (imf10.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.51 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: jfxtp67fubqib13m51y6p3xysnezbszh X-HE-Tag: 1667405486-770496 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: <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 e8b72336c096..a2f477cc48c7 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1887,17 +1887,18 @@ static bool flush_dirty_inode(struct page *page) void f2fs_flush_inline_data(struct f2fs_sb_info *sbi) { pgoff_t index = 0; - struct pagevec pvec; - int nr_pages; + struct folio_batch fbatch; + int nr_folios; - pagevec_init(&pvec); + folio_batch_init(&fbatch); - 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 (!IS_DNODE(page)) continue; @@ -1924,7 +1925,7 @@ void f2fs_flush_inline_data(struct f2fs_sb_info *sbi) } unlock_page(page); } - pagevec_release(&pvec); + folio_batch_release(&fbatch); cond_resched(); } }