From patchwork Tue Feb 14 08:37:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13139672 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 65303C05027 for ; Tue, 14 Feb 2023 08:37:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 046B66B0073; Tue, 14 Feb 2023 03:37:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F3863280003; Tue, 14 Feb 2023 03:37:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E27EF280002; Tue, 14 Feb 2023 03:37:30 -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 D4FB66B0073 for ; Tue, 14 Feb 2023 03:37:30 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 7EEFDAA9F7 for ; Tue, 14 Feb 2023 08:37:30 +0000 (UTC) X-FDA: 80465243460.23.EDCAE74 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf10.hostedemail.com (Postfix) with ESMTP id CB56FC0003 for ; Tue, 14 Feb 2023 08:37:27 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=SA50Sxu7; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf10.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676363847; 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=jiirWQEzjOJm38ClQocxHDg9OYUUCbqX/zh69yaIxOk=; b=VcDbiA6JqdCAMi+jHnXW421c8/gMNDPDdmZjVQOw7kAQgkCkZDckhjGnjy4PqaVbP+Tjxn +N6l89Gm1BEkbRoNsXrr04SX9tUvLE2Kwxgm4cqSSL71PorGznM5DpBysRjUTuSf5PdKPF xMmAkI4+ZyyD75wqofNL5qYiZKCR/9g= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=SA50Sxu7; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf10.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676363847; a=rsa-sha256; cv=none; b=AYkKP5eXQ15SGXvanTI6P8+9FHCBoHUkR2GnmBCIGTyAb8RO/AtKY+wSRBVW3oXmKnL131 Q1XFrncIdLQVZKPZ39+QrYvcZhV/+Y9xhLHOx0YGgMFp0DuyPwFDCioG0VSPUCr1PSG8d6 vECVTS+bxcQq/ntqk5CLRP42W9IKVzE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676363847; 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=jiirWQEzjOJm38ClQocxHDg9OYUUCbqX/zh69yaIxOk=; b=SA50Sxu7bxTu2TnVlP5DXQM9J32Ss4PvBYoZ+FY/gzMIUr/jqyCa9d2lwJVzjxGmKgPcEo 5dmGYFbMiJuBRe3eo/Ks+jpM+Gyjw6yS0h7aPAleCuwyjB+kBcmcFovEqI+FUI0KTmvg0e 8j8ZazOqDi6CnELxsA6y7QmSsjZUxoc= 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-593-FzkSCvMjPFy74fuTaPhQVA-1; Tue, 14 Feb 2023 03:37:23 -0500 X-MC-Unique: FzkSCvMjPFy74fuTaPhQVA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E5B48811E6E; Tue, 14 Feb 2023 08:37:22 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2E9EC15BA0; Tue, 14 Feb 2023 08:37:14 +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 v3 1/5] splice: Rename new splice functions Date: Tue, 14 Feb 2023 08:37:06 +0000 Message-Id: <20230214083710.2547248-2-dhowells@redhat.com> In-Reply-To: <20230214083710.2547248-1-dhowells@redhat.com> References: <20230214083710.2547248-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Rspamd-Queue-Id: CB56FC0003 X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: jzpnd1qw5iqmtxnjqm4m75adongfugqu X-HE-Tag: 1676363847-97124 X-HE-Meta: U2FsdGVkX194RrA5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CDyKXCl5hkrjTwsFw6sFUC+krcpTiJYn8HRpmtbWrFByZJli23V4SjBtm4RM5YHUBfOcZDVbZnm1rnZ46SAad1HTa+UAXiTeuakARdLYpkK2jKbwkjn8+V8TsjVNA1O6OvVRvearfMhP2vs02rMafS59PeqoatXL1c/ItIUnOigT9BHoL9vJ2VxeEhbJG+TVN2GbzepfAjynl8wip39Nlo2XsKGgWbbgGSViWIlTqdwACxgL8a0LHjKNCUUDpiyqNr/yqKyrxGVMDIr/B1JgUrbn8IUK08GEAGtW7auhtGyfR106lmxED27Ou/wQnkEYSJ0VXuX4BmTP9l+DjY4BHxhn9I 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 Reviewed-by: 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 --- 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);