From patchwork Tue Jun 25 10:18:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 13710835 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6796AC30653 for ; Tue, 25 Jun 2024 10:19:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5B2966B02FB; Tue, 25 Jun 2024 06:19:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4EFCD6B02EB; Tue, 25 Jun 2024 06:19:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D76596B02F9; Tue, 25 Jun 2024 06:19:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 88B856B02EF for ; Tue, 25 Jun 2024 06:19:14 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 32F9216192A for ; Tue, 25 Jun 2024 10:19:14 +0000 (UTC) X-FDA: 82269013428.23.59BDA6C Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf20.hostedemail.com (Postfix) with ESMTP id D94821C0020 for ; Tue, 25 Jun 2024 10:19:11 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b="aLbP/MM9"; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=npRodn1v; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b="aLbP/MM9"; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=npRodn1v; spf=pass (imf20.hostedemail.com: domain of jack@suse.cz designates 195.135.223.130 as permitted sender) smtp.mailfrom=jack@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719310738; 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=+8Lca3al1fhzTJQxTF9PNVlpICKgh2TdoBsflcocPqU=; b=oHfTaYukeVDFKeO0ECu/j+0zeyZ7b7KLgcsPnw+rabE6IQ4KykxzaRai1m2jwwO3iVnIva peFfd6tW90ybmMFQVD+TOXeKQFhuSjB/EseUbviN9Et2VWq/1pFg+LofX4z8tF2+EaJ0eT zIEKHLE9HvY7YjasEBlfS2SMiIGec/s= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719310738; a=rsa-sha256; cv=none; b=hvm/90GTHpChZkjM8yNmm0P4oHPCyhXJIacQm6kCn03ummtmOuNqYb54RGY3fYCgAyzBJ+ htj5xaG0F5Zj9WZGwPMjdNEehaejmEeekGuurUvCGDlVszy7dIQW6vAaN+seB26o5aDvHG E5ATN2D+iqPAsWzqV/YqnNdP2muT3Bc= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b="aLbP/MM9"; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=npRodn1v; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b="aLbP/MM9"; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=npRodn1v; spf=pass (imf20.hostedemail.com: domain of jack@suse.cz designates 195.135.223.130 as permitted sender) smtp.mailfrom=jack@suse.cz; dmarc=none Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9038321A78; Tue, 25 Jun 2024 10:19:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1719310750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+8Lca3al1fhzTJQxTF9PNVlpICKgh2TdoBsflcocPqU=; b=aLbP/MM9R/HRsbC+rOxPee0706vrfOroPL1a++4Gq0YAA+ZHFPQmMmIuEEow8axyZWO02E +xWtn5lDRaK4JEnd4pVYWFBgT7WYxbf91JRpi7nBXHOVIAzFU0W4jURryRY4RDU71oPHPo m673nOhFNLB6tKwiOyFEwknGni3ALvI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1719310750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+8Lca3al1fhzTJQxTF9PNVlpICKgh2TdoBsflcocPqU=; b=npRodn1v5RJ6WpWaGog0gYIz4mqWaD2yvikAGJO5neCTaC2Xgks7xQb6+90bSZFtOwcdNq UCKfCQabGbgNSiDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1719310750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+8Lca3al1fhzTJQxTF9PNVlpICKgh2TdoBsflcocPqU=; b=aLbP/MM9R/HRsbC+rOxPee0706vrfOroPL1a++4Gq0YAA+ZHFPQmMmIuEEow8axyZWO02E +xWtn5lDRaK4JEnd4pVYWFBgT7WYxbf91JRpi7nBXHOVIAzFU0W4jURryRY4RDU71oPHPo m673nOhFNLB6tKwiOyFEwknGni3ALvI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1719310750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+8Lca3al1fhzTJQxTF9PNVlpICKgh2TdoBsflcocPqU=; b=npRodn1v5RJ6WpWaGog0gYIz4mqWaD2yvikAGJO5neCTaC2Xgks7xQb6+90bSZFtOwcdNq UCKfCQabGbgNSiDg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 839B513AD8; Tue, 25 Jun 2024 10:19:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 4jUmIJ6ZemaAWQAAD6G6ig (envelope-from ); Tue, 25 Jun 2024 10:19:10 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id E6F44A0937; Tue, 25 Jun 2024 12:19:09 +0200 (CEST) From: Jan Kara To: Cc: Andrew Morton , Matthew Wilcox , , Jan Kara Subject: [PATCH 05/10] readahead: Drop index argument of page_cache_async_readahead() Date: Tue, 25 Jun 2024 12:18:55 +0200 Message-Id: <20240625101909.12234-5-jack@suse.cz> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240625100859.15507-1-jack@suse.cz> References: <20240625100859.15507-1-jack@suse.cz> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2630; i=jack@suse.cz; h=from:subject; bh=YaPpgDx+Qmuj6I/gWcDPw0IJuohKdGqM4cxIZra6ocM=; b=owEBbQGS/pANAwAIAZydqgc/ZEDZAcsmYgBmepmPJlMUunnObQNV3cSQ7E5jsGTZZugbhFy9t2we 3vTzJjqJATMEAAEIAB0WIQSrWdEr1p4yirVVKBycnaoHP2RA2QUCZnqZjwAKCRCcnaoHP2RA2VPxCA DjI+zbpNTOWZjm24JaNK8kwW96LsA6mIzfFDMpRH5Q7+tLMgfyh+bRIUakcieBituNu4bPjdIUpRgg e8B/R6bZ51rcc7vbqRlzQAcKB2mYYiE4VGY4BzZBT14p7QhdIcuNR1+0O/4gi4EzZ8+P/RmOQRC30u 8aR1AVLtY3fAVPv4fDROqN9gH8cu8A5wowtzrOe5wtPk+f+nCrH839vlpN16YK2Vkvk1X2MnyHLVuE bfT2JIcRhjSAuu7IgzMdqrMiC9Hm+zzZ6Ct/RzoASyDlYkCM5NYy2/6gu59wtHKdPR3WcHo/JTneTp sQ9aeDFOJT2gVEjdq1pM2wm/GD8huG X-Developer-Key: i=jack@suse.cz; a=openpgp; fpr=93C6099A142276A28BBE35D815BC833443038D8C X-Rspamd-Action: no action X-Rspamd-Queue-Id: D94821C0020 X-Stat-Signature: pc8epwcw5tfrbmc9h48kkkka77xamtou X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1719310751-864456 X-HE-Meta: U2FsdGVkX1+OJ48cR/6dNy/BKiX9HHEpS4i9h+bCrq0ha5tHYuo3KhuTbb8A1liIeBFBaAFs1yDE4DRkmGHNcsCiQa883XXmj0rDyQDjPGQDMukVr47/b0H/w38WqspOBb4YBIk5Cp6rNh3uV2Xl7kaNokdJlvp+7ZYHEXC0ObvYZtlcbbqK/ZtueW1+hvBDbgWKbQvFTsfINZNiRw3X73+2FXAali2wfRqqngka/1W6mgZi+uQP/S3OXL68nmgLWlRZlx8rqlkV4eStPl6EPcw3mwzjJ5DMjsVdMQwpFQ2Hy1KT7cVlsgYARxsBTZBFj6+55lebnAGbo8fdA7PfMkAfNJ7A2Fnrtx6Lk3OQK2iTo4yBC2i+NfvDEjdXicyZdZmDPaBv96uBwewtQf4ToDUTTmKkkm0wSF2ESJEnwCTSnWLwInJiJddeuTrEaantep6quEuoAoP0XklnuE/Ih/URaiVdO7jEgffu25OYxqZ40qn6TLGgbP+Jh00rh0B+pJ4C2eyQLZBRrFJmkpFX0YFCKQWcoHvw1fPUKMABvCJeENYsUfxxbnQliZFhrXtBlXRJbrS6Yz21t+5T4O/oegMWGuYOD/aLKiZVIKhxyoAqdlWeNdzh9Ehv70hV+sujY9qy2dGDzTR0DanwKdj9ShaDV0lRTngBhYXcBuW7zsx9MnkzPvfK8c8FLhJanmK++82qMtfHQT+j+mAW3MOFrH0MQmWc6ZARUIV97eoCMDC5pjPjG05FGnKe+4g0kdM4JKQrERNapXTbeJcSgOAAwM9smq1bs3ChgooV9ggUYGkdSuMHPptX7bOTSPw+nH2vMs/Y8biMaAqCb0MDt/OwpBHMEJKUWcs4+/STjXWaYDgCy6F7/Lo2rX0Fn6RctI1BNtAeitnFVqsAFNYZcjzTaY915dnddhle3KcMQQLF5PbV6DV9w/fKawNGuPxtYqh4CHzUpNoxVZdbRmWCs8n 0fGVkYCv ib09mvJ07KTBRlh3f6lTtvXRJjNWx64gYWCjQgmy8dJgimMUv4lokG2sz7w79wIKDDDbe4a+AELGeRh6NjU86SXEVlwK/bKgQi+hQrewRk75CqlDxJjGO/rmEUVffdj/J3zBICx1XY0fSiC7N0psi/E2eqTvhHUTLtDp7ud2tHMgOX0m67U8vLTiIb1YLoXcHH1RfwZYnooEVEld3EfBZbk5c5epfc6IDs778nGTrBI36fMLx2jIsZY5Xa3Gn90XiPsm6 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: List-Subscribe: List-Unsubscribe: The index argument of page_cache_async_readahead() is just folio->index so there's no point in passing is separately. Drop it. Signed-off-by: Jan Kara --- fs/btrfs/relocation.c | 3 +-- fs/btrfs/send.c | 2 +- include/linux/pagemap.h | 7 +++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 8b24bb5a0aa1..e7e8fce70ccc 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -2975,8 +2975,7 @@ static int relocate_one_folio(struct inode *inode, struct file_ra_state *ra, if (folio_test_readahead(folio)) page_cache_async_readahead(inode->i_mapping, ra, NULL, - folio, index, - last_index + 1 - index); + folio, last_index + 1 - index); if (!folio_test_uptodate(folio)) { btrfs_read_folio(NULL, folio); diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 3dd4a48479a9..dbf462e67ad0 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -5307,7 +5307,7 @@ static int put_file_data(struct send_ctx *sctx, u64 offset, u32 len) if (folio_test_readahead(folio)) page_cache_async_readahead(mapping, &sctx->ra, NULL, folio, - index, last_index + 1 - index); + last_index + 1 - index); if (!folio_test_uptodate(folio)) { btrfs_read_folio(NULL, folio); diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index ee633712bba0..7ad4decd4347 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -1307,8 +1307,7 @@ void page_cache_sync_readahead(struct address_space *mapping, * @mapping: address_space which holds the pagecache and I/O vectors * @ra: file_ra_state which holds the readahead state * @file: Used by the filesystem for authentication. - * @folio: The folio at @index which triggered the readahead call. - * @index: Index of first page to be read. + * @folio: The folio which triggered the readahead call. * @req_count: Total number of pages being read by the caller. * * page_cache_async_readahead() should be called when a page is used which @@ -1319,9 +1318,9 @@ void page_cache_sync_readahead(struct address_space *mapping, static inline void page_cache_async_readahead(struct address_space *mapping, struct file_ra_state *ra, struct file *file, - struct folio *folio, pgoff_t index, unsigned long req_count) + struct folio *folio, unsigned long req_count) { - DEFINE_READAHEAD(ractl, file, ra, mapping, index); + DEFINE_READAHEAD(ractl, file, ra, mapping, folio->index); page_cache_async_ra(&ractl, folio, req_count); }