From mboxrd@z Thu Jan 1 00:00:00 1970 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 BC575C636D6 for ; Fri, 17 Feb 2023 09:00:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3901F6B0074; Fri, 17 Feb 2023 04:00:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3417B6B007B; Fri, 17 Feb 2023 04:00:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 208046B0080; Fri, 17 Feb 2023 04:00:12 -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 0F6CE6B0074 for ; Fri, 17 Feb 2023 04:00:12 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id AFD48AB933 for ; Fri, 17 Feb 2023 09:00:11 +0000 (UTC) X-FDA: 80476187022.24.1A77FD4 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf02.hostedemail.com (Postfix) with ESMTP id 955C680015 for ; Fri, 17 Feb 2023 09:00:09 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=VkttAHWq; spf=pass (imf02.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.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=1676624409; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=dPCk17Mouat/TBH5mlaAsgT9/3K10wB1QNqvj5iJ3ZA=; b=cVjZGALhfh9Y6Tpn4Os+AqQk3rXh15GDkrgXkoJsTQFFAXV5iGaCgOVKHZdIZHegGwjX3M sp/lAuqCednBxN7j6nvAJo3MaXRqzvL8DhIMySblHZ9Nu5w+0jPWiOvIHQQZC5fuqtSf6j mlmRycu2e+iMLS22UfekzJb1EMugtuE= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=VkttAHWq; spf=pass (imf02.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.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=1676624409; a=rsa-sha256; cv=none; b=sIk8wTygOv7deImin0nXIZpeYCDrsmOM8gpbGEifcTPHl4L4fHu+GLGTPzuBnfUpd5VghN pj8+neXq9Xn75PmlQ+d2B6/GgShoW3yJ81xQW2DuMULDEhWi+RvTVJ/l00MZ9JEfT/jwyT 15FG3sOl1/Pjksb+P1eENd+OAE2a6cY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676624408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dPCk17Mouat/TBH5mlaAsgT9/3K10wB1QNqvj5iJ3ZA=; b=VkttAHWqX/FzMjtA89uBQ4PoCKVYAVU19TKYd597mc94KnB8lkM6ffPsQfZDo3MFn3wERA F70sR9YA7u5oc+uN5a1rAlJ8/P2tWdHxFSj5/XIWQe7XqnXn4ak88FaOwexnNlWBLThPdY VGxodzIDdXK1IsudaTXpdoOQXoz9zo0= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-110-Go1PN4SZM9SYllW9uTMn5w-1; Fri, 17 Feb 2023 04:00:04 -0500 X-MC-Unique: Go1PN4SZM9SYllW9uTMn5w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 132CA299E75E; Fri, 17 Feb 2023 09:00:04 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id F076F1121314; Fri, 17 Feb 2023 09:00:01 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20230216214745.3985496-4-dhowells@redhat.com> References: <20230216214745.3985496-4-dhowells@redhat.com> <20230216214745.3985496-1-dhowells@redhat.com> Cc: dhowells@redhat.com, Steve French , Jens Axboe , Al Viro , Shyam Prasad N , Rohith Surabattula , Tom Talpey , Stefan Metzmacher , Christoph Hellwig , Matthew Wilcox , Jeff Layton , linux-cifs@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, syzbot+a440341a59e3b7142895@syzkaller.appspotmail.com, Christoph Hellwig , David Hildenbrand , John Hubbard Subject: Re: [PATCH 03/17] splice: Add a func to do a splice from an O_DIRECT file without ITER_PIPE MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4125891.1676624401.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Fri, 17 Feb 2023 09:00:01 +0000 Message-ID: <4125892.1676624401@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Rspamd-Queue-Id: 955C680015 X-Stat-Signature: t7t3x5zbnoku1rrn5ic6fqr1t5wdur3j X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1676624409-822641 X-HE-Meta: U2FsdGVkX18TSd6BgErTqVKY89KVw9LwpBdR95MoK/kKInfOAGk7yTno6KMqK3QFzpL8i9i3HbRmfRKVjmc88uUrOAVvBE7btXIXtI3ruP5Wj2jyOw2eRZ2zqgOwas1Y3IYrU7O2z55z4hUwdeNwJZZfLF3y0VQVW8RknsdIfcfHbmS+8pee+43rTxBOgBPF7FZ6QrAdENniWlKFGUrPL0wjI5u+QuyDohXGE/lU+Vcrovl3Kmhg6gfYBiUX9WLM89d6gDeWaxYj10QY7UJPXb1dcaOqxGjiqI1EpyXiachbvLHBeo4IQh/7Tu1uvTxrDksVPRjPc3rSeUBQ6W08K/tPOvyeQV6tkY96TSq7zf/ccLqDNXWhImQMAfC1iMIPmpsNFedoVzbo44mg5UttliK0l9KxuBFedrbmuCO55YU1MdCpDgSyQGKkYwiANAgQPzj+6F7GiEkr/sKj2sM0M0uE4kLQDd4mioJOGR91nya09K39Tc7c6G6C0iyw7+JUd0qwgvwaEFMXvuFunOiRGOo2UpbvlufD2KSksAPzvmwX2h76ipu3S78DZPeU3DOYiGYbcsQ2cC8fpAvXGdmm+1dgGUZJ+I5cf9RhXRni5/HM5B4NKXABokVuGzBg5aDmhjF8a9vhEZ0yn2uApL9NhmxtPDUCZIUgDgGrsFHMOJ/zqfiUA5eg2xXQ23AZfUeP9Tal1bqgnY/pZblIQNWGDdMNLcVCcaz9lVwG0ehuOpf0E6JQoijkALQ7ztPbUGDZIC9jSZOKfU8LEuSjlcz8TvUnyGuY5a4lcsf0O1p0pjXmSm1DOIpnygD85KDq4P43rucnTZ4Ui6Cc3o4Re7LLYv1r5ntOOYUzPXEmBQ1+i226IlSYS/eEC+5Yk5jzJu8GYdCRa5EXTGbfQctZ+CF4/azUpkfIBaicCeTxvRVaTseesb7l2YA/S/2j0rsJjC+gb7TYCry+2FO+bFrf8qI 3hyUHxBF fzeOcoLlZbHxhTR5MpCE4AAi9A8LXZ+YhpqU5aSnVMUHTbUzDCer2xN0jGt8/bAZT12k3roGhijD7+gDjlY7GByXMtMMrUlKQOpWL0M7f3ao7xaS5Eg/4wqe+QC8HACKGIutObwgQJQu0NSVeD0yimcGoAHj0BfuRiR3RUBUi2ALh78Bjjln0QoUCV6PNB9O8REivfu+U10KYLz3Gxk+aqcwojNOvOe8WNQ8Sqx+MG7lLUe43g/ODfBexn9HysW6YXDzxXsKzD72BRLOx7BPoePZGcLqMtvphW77IpXbt9d2U/T7hkzdoDH2+SoxuNREgTMcZODzSP3TtsRwX6/4XfQuaG5ezggwB+1m2MoO0k144CvyNBTxa4HGLmYHCzbO/YKcZPUGdx6PHTI850C+sTJzXLPr6PjYKZiHLK8R9l2iykGi1b9ZC23v+q368qjkJC8Sq4TbcN2cSkc2MqBNLKDerkg== 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: David Howells wrote: > diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h > index 6cb65df3e3ba..d2c3f16cf6b1 100644 > --- a/include/linux/pipe_fs_i.h > +++ b/include/linux/pipe_fs_i.h > @@ -156,6 +156,26 @@ static inline bool pipe_full(unsigned int head, uns= igned int tail, > return pipe_occupancy(head, tail) >=3D limit; > } > = > +/** > + * pipe_buf - Return the pipe buffer for the specified slot in the pipe= ring > + * @pipe: The pipe to access > + * @slot: The slot of interest > + */ > +static inline struct pipe_buffer *pipe_buf(const struct pipe_inode_info= *pipe, > + unsigned int slot) > +{ > + return &pipe->bufs[slot & (pipe->ring_size - 1)]; > +} > + > +/** > + * pipe_head_buf - Return the pipe buffer at the head of the pipe ring > + * @pipe: The pipe to access > + */ > +static inline struct pipe_buffer *pipe_head_buf(const struct pipe_inode= _info *pipe) > +{ > + return pipe_buf(pipe, pipe->head); > +} > + > /** > * pipe_buf_get - get a reference to a pipe_buffer > * @pipe: the pipe that the buffer belongs to > diff --git a/lib/iov_iter.c b/lib/iov_iter.c > index f9a3ff37ecd1..47c484551c59 100644 > --- a/lib/iov_iter.c > +++ b/lib/iov_iter.c > @@ -186,12 +186,6 @@ static int copyin(void *to, const void __user *from= , size_t n) > return res; > } > = > -static inline struct pipe_buffer *pipe_buf(const struct pipe_inode_info= *pipe, > - unsigned int slot) > -{ > - return &pipe->bufs[slot & (pipe->ring_size - 1)]; > -} > - > #ifdef PIPE_PARANOIA > static bool sanity(const struct iov_iter *i) > { This needs moving to the previous patch, but no code change overall. David