Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5268919rwl; Sun, 8 Jan 2023 11:43:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXsLbESjvdf2Kf0vYUMybgnKTNrezmO0pw/PCoTc6XQuoQeKv4sCAN6nZ2vzDcEKuhmLTMIr X-Received: by 2002:a05:6300:8105:b0:a4:3fc2:eb10 with SMTP id bs5-20020a056300810500b000a43fc2eb10mr73118212pzc.37.1673207036130; Sun, 08 Jan 2023 11:43:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673207036; cv=none; d=google.com; s=arc-20160816; b=UzgQROEaRTz/ozemu9QtvbfX082KipGE8qetIpprbY/u5qZnkNuu1b0xHA4iNKBE1B G9hy0L4NkK8JNwXvKn8h2aqZZjUYxpIDjlr/ZCv1nhagAydH+c2Zdy0yvLYNhVqptrAj XH6xxT68C0F8Vu3ATmgjm9f7hbqaH8o1fvBe8/wB049t9/rPxVuOZvINz/d+hjnWYhKb AaP3/QJ5FVa4vvqa+4kE+DHcOVJs6ytJSXljGKoRR7PTG4c3ODkA0T9XU6OXiqgZvJ+1 6UvlU9O9h4Rq90hy4rmoVFlhR9nLE4ppuGY2yY7t2OlLFBzy7RbA0/Q1lVIIEKbF/zhP GInQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=L5KMkMa80rm5HNuuSM+y6bmm81BxzRO2A8GEgrR4WVI=; b=1HNdp5mY+z0+pXiZcJf1vjo8VL15Fdp2GE2ZmWBAdDdYI1/T/2etIcPYDvUVSuoRQN p8/XqcdRD0AmSNLkTetkMxlN9HCrj7ee9e11TSQzhqFSHVNZ6Wk/Uxm4UZtaZ/dxKkYI wapsCGEumG9Ka1wLYL8zkoAUs6pqta0k1QBAp2QWQ5pZrZuhtS6leUDEPT/47R9UBw+e fvl/HQDZH9BuCttLHc8As4EfILE4IppnDSn0sg25t7Ya5HHC3O6V5tPBn9ptyB0exWbw uQkj3Tf95TSWnJKdhkw4nwmIcgKunwcq4hZIuvN3/axM0okuLpVPpd11GodsXrlOdGOL 1xeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jVEPXp8V; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f124-20020a636a82000000b004a7b9936bc0si7347071pgc.473.2023.01.08.11.43.43; Sun, 08 Jan 2023 11:43:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jVEPXp8V; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234512AbjAHTnI (ORCPT + 99 others); Sun, 8 Jan 2023 14:43:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233641AbjAHTnD (ORCPT ); Sun, 8 Jan 2023 14:43:03 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA89EDED3 for ; Sun, 8 Jan 2023 11:41:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673206862; h=from:from:reply-to:subject:subject: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=L5KMkMa80rm5HNuuSM+y6bmm81BxzRO2A8GEgrR4WVI=; b=jVEPXp8Vt9176v2+/Cn+7vT12TQX8Om8Tpdszjf7LKlVEVvLdjRVMi1W7DwkDIUYRfRxOO /RWBhEjhsUH+EmTOKI9T2d0V4t+oAe1Q+jUiGTBapv34EO05bwhMoAfumt6j+Mxf+Sozlk SmMhrtgxeKovLTq2MVyzEIh/IGfZnRQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-228-uXliOmo7OXSdWbLqDzjl8A-1; Sun, 08 Jan 2023 14:40:58 -0500 X-MC-Unique: uXliOmo7OXSdWbLqDzjl8A-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 420FC1875041; Sun, 8 Jan 2023 19:40:58 +0000 (UTC) Received: from pasta.redhat.com (ovpn-192-3.brq.redhat.com [10.40.192.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id E49DA492B06; Sun, 8 Jan 2023 19:40:55 +0000 (UTC) From: Andreas Gruenbacher To: Christoph Hellwig , "Darrick J . Wong" , Alexander Viro , Matthew Wilcox Cc: Andreas Gruenbacher , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, cluster-devel@redhat.com, Christoph Hellwig Subject: [RFC v6 07/10] iomap: Rename page_prepare handler to get_folio Date: Sun, 8 Jan 2023 20:40:31 +0100 Message-Id: <20230108194034.1444764-8-agruenba@redhat.com> In-Reply-To: <20230108194034.1444764-1-agruenba@redhat.com> References: <20230108194034.1444764-1-agruenba@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org The ->page_prepare() handler in struct iomap_page_ops is now somewhat misnamed, so rename it to ->get_folio(). Signed-off-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- fs/gfs2/bmap.c | 6 +++--- fs/iomap/buffered-io.c | 4 ++-- include/linux/iomap.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 41349e09558b..d3adb715ac8c 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -957,7 +957,7 @@ static int __gfs2_iomap_get(struct inode *inode, loff_t pos, loff_t length, } static struct folio * -gfs2_iomap_page_prepare(struct iomap_iter *iter, loff_t pos, unsigned len) +gfs2_iomap_get_folio(struct iomap_iter *iter, loff_t pos, unsigned len) { struct inode *inode = iter->inode; unsigned int blockmask = i_blocksize(inode) - 1; @@ -998,7 +998,7 @@ static void gfs2_iomap_put_folio(struct inode *inode, loff_t pos, } static const struct iomap_page_ops gfs2_iomap_page_ops = { - .page_prepare = gfs2_iomap_page_prepare, + .get_folio = gfs2_iomap_get_folio, .put_folio = gfs2_iomap_put_folio, }; @@ -1291,7 +1291,7 @@ int gfs2_alloc_extent(struct inode *inode, u64 lblock, u64 *dblock, /* * NOTE: Never call gfs2_block_zero_range with an open transaction because it * uses iomap write to perform its actions, which begin their own transactions - * (iomap_begin, page_prepare, etc.) + * (iomap_begin, get_folio, etc.) */ static int gfs2_block_zero_range(struct inode *inode, loff_t from, unsigned int length) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 666107c3a385..006ddf933948 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -607,8 +607,8 @@ static struct folio *__iomap_get_folio(struct iomap_iter *iter, loff_t pos, { const struct iomap_page_ops *page_ops = iter->iomap.page_ops; - if (page_ops && page_ops->page_prepare) - return page_ops->page_prepare(iter, pos, len); + if (page_ops && page_ops->get_folio) + return page_ops->get_folio(iter, pos, len); else return iomap_get_folio(iter, pos); } diff --git a/include/linux/iomap.h b/include/linux/iomap.h index d50501781856..da226032aedc 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -126,17 +126,17 @@ static inline bool iomap_inline_data_valid(const struct iomap *iomap) } /* - * When a filesystem sets page_ops in an iomap mapping it returns, page_prepare + * When a filesystem sets page_ops in an iomap mapping it returns, get_folio * and put_folio will be called for each folio written to. This only applies * to buffered writes as unbuffered writes will not typically have folios * associated with them. * - * When page_prepare succeeds, put_folio will always be called to do any + * When get_folio succeeds, put_folio will always be called to do any * cleanup work necessary. put_folio is responsible for unlocking and putting * @folio. */ struct iomap_page_ops { - struct folio *(*page_prepare)(struct iomap_iter *iter, loff_t pos, + struct folio *(*get_folio)(struct iomap_iter *iter, loff_t pos, unsigned len); void (*put_folio)(struct inode *inode, loff_t pos, unsigned copied, struct folio *folio); -- 2.38.1