From patchwork Mon Feb 13 13:46:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13138461 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 C25C4C6379F for ; Mon, 13 Feb 2023 13:46:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3BC426B0073; Mon, 13 Feb 2023 08:46:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2A7CF6B007E; Mon, 13 Feb 2023 08:46:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0FB156B0080; Mon, 13 Feb 2023 08:46:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id F1C786B0073 for ; Mon, 13 Feb 2023 08:46:30 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id B8546160800 for ; Mon, 13 Feb 2023 13:46:30 +0000 (UTC) X-FDA: 80462393340.05.8C43F6F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf05.hostedemail.com (Postfix) with ESMTP id EB7EE100006 for ; Mon, 13 Feb 2023 13:46:28 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=UcsStgGR; spf=pass (imf05.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676295989; 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=cowZ1cmLrnZZxcephacOQa4mjhuuVERSSt8ZL/UsOKw=; b=V7r1m2/wPbLuNqOuprzEeA3KYk8T8FAs0Yhh5dr8zWc95dNzCYzS9RIse3lsEmr5jTiIJ+ IIaaDXJKxMOKLmtf1l6wUcU7IAEUGXNacLbU6bkDj37Hf+8KeGQDsrSphc+rWcETzxoPpR kE9RcZmQSJvXp+Lx57wtl5eZGhzITmQ= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=UcsStgGR; spf=pass (imf05.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676295989; a=rsa-sha256; cv=none; b=Ee2+v/3sE72QvAFTq9TqyI/GoXpAMI2NFfobFYse6hvinv9gP5gKruF/VO3ORU6agJWSxZ 7uaseMctbt7gj+aTCV6fLl4bJOX5bC/Bf0xSvcHLiveKmaEmgk+QoPyNVwfHOc3qDyAgAy dpHxcAbiEhy+Kp6HzCGqbgjDYelhf9I= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676295988; 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=cowZ1cmLrnZZxcephacOQa4mjhuuVERSSt8ZL/UsOKw=; b=UcsStgGRLEjtmBYHgdZfVeithaEVHoFBX508FSp1gJ+WWhJZu6uI/qWqRcXQWpdN4WyGyL DBxEJup17wXim4VlW1XyGlG+cMvqqlwTuYQtFcB4//Lhb/4L4nR4AAODROWoAVHvrnP+4C nSUOERABPNw5HeADbCYlu9kuJpMAOpw= 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-167-u6s-Mzk-MTWOuQY7_HuoaQ-1; Mon, 13 Feb 2023 08:46:27 -0500 X-MC-Unique: u6s-Mzk-MTWOuQY7_HuoaQ-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 EF5EE971086; Mon, 13 Feb 2023 13:46:25 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0AE40492C3C; Mon, 13 Feb 2023 13:46:23 +0000 (UTC) From: David Howells To: Jens Axboe , Al Viro , Christoph Hellwig Cc: David Howells , Matthew Wilcox , Jan Kara , Jeff Layton , David Hildenbrand , Jason Gunthorpe , Logan Gunthorpe , Hillf Danton , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Christoph Hellwig , John Hubbard Subject: [PATCH 1/4] splice: Rename new splice functions Date: Mon, 13 Feb 2023 13:46:16 +0000 Message-Id: <20230213134619.2198965-2-dhowells@redhat.com> In-Reply-To: <20230213134619.2198965-1-dhowells@redhat.com> References: <20230213134619.2198965-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: EB7EE100006 X-Stat-Signature: cco4bo3yerg51e5dy5pbu8wye8ad173n X-Rspam-User: X-HE-Tag: 1676295988-172662 X-HE-Meta: U2FsdGVkX19XRywcqIxQPtkhyvz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JuaLuVyCaLEWHMxeXka2VZe8Qp74FgtA3G+onfw5CbT7gFSsWSufpozys+WPL0I8X/2oI76FOOZbnMkD9dwvROsNd/9DRI+nE08USL0/8uXyuAVhrVX/xbZhRlCRGPtQaInGDu+JRieTDyUKRNvKKPMEpd5533lmZItHcY3T2sdLK2IIRGsH3VlXsr9vWCydI04Z/vIySFGDI3BF4Zi9yE/PF7sIv4d7zKzxdX0FIsgZw6K1lh4RSSPw7NOneoFqPyJWJZQ1h94WZ4USBDiF1HzOybFpiyK1mZYZ6F6R6oFLGBErz+N0oXL18+i9/YI8c 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: Rename generic_file_buffered_splice_read() to filemap_splice_read(). Rename generic_file_direct_splice_read() to direct_splice_read(). Requested-by: Christoph Hellwig Signed-off-by: David Howells cc: Christoph Hellwig cc: Jens Axboe cc: Al Viro cc: John Hubbard cc: David Hildenbrand cc: Matthew Wilcox cc: linux-block@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org Reviewed-by: Christoph Hellwig --- fs/splice.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/fs/splice.c b/fs/splice.c index 2717078949a2..91b9e2cb9e03 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -287,9 +287,9 @@ void splice_shrink_spd(struct splice_pipe_desc *spd) * Splice data from an O_DIRECT file into pages and then add them to the output * pipe. */ -static ssize_t generic_file_direct_splice_read(struct file *in, loff_t *ppos, - struct pipe_inode_info *pipe, - size_t len, unsigned int flags) +static ssize_t direct_splice_read(struct file *in, loff_t *ppos, + struct pipe_inode_info *pipe, + size_t len, unsigned int flags) { struct iov_iter to; struct bio_vec *bv; @@ -417,10 +417,9 @@ static size_t splice_folio_into_pipe(struct pipe_inode_info *pipe, * Splice folios from the pagecache of a buffered (ie. non-O_DIRECT) file into * a pipe. */ -static ssize_t generic_file_buffered_splice_read(struct file *in, loff_t *ppos, - struct pipe_inode_info *pipe, - size_t len, - unsigned int flags) +static ssize_t filemap_splice_read(struct file *in, loff_t *ppos, + struct pipe_inode_info *pipe, + size_t len, unsigned int flags) { struct folio_batch fbatch; size_t total_spliced = 0, used, npages; @@ -529,8 +528,8 @@ ssize_t generic_file_splice_read(struct file *in, loff_t *ppos, if (unlikely(!len)) return 0; if (in->f_flags & O_DIRECT) - return generic_file_direct_splice_read(in, ppos, pipe, len, flags); - return generic_file_buffered_splice_read(in, ppos, pipe, len, flags); + return direct_splice_read(in, ppos, pipe, len, flags); + return filemap_splice_read(in, ppos, pipe, len, flags); } EXPORT_SYMBOL(generic_file_splice_read);