Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1659050lqp; Mon, 15 Apr 2024 12:57:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVIoaCQ5nnrREEHQdDYR6xCZauausvAIuKNMOEUz0QJHS3gpvA8sEUmX1jy+sK0vlodoCAhrpcwaS6lAIlnEMROX4sviMN51tDtcmCEoQ== X-Google-Smtp-Source: AGHT+IFlFkQtba7Bu4++nJm/CKQDmknm0h+Egp2TwzgnVGH+AwHb+8A7L2Pnf2rAEEy5jQz8MaCX X-Received: by 2002:ac8:5a41:0:b0:432:b560:41fa with SMTP id o1-20020ac85a41000000b00432b56041famr53992qta.34.1713211059712; Mon, 15 Apr 2024 12:57:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713211059; cv=pass; d=google.com; s=arc-20160816; b=XTXSqR9NRkC3uAuZ4TbdJxW3dz2gftWfQkjN4gKaZGsfTWWs0rRH/f4y6bf0Q4wKvg 0gVNpID22h2sXqEZzFJkyyjym96pyvssDJlR+xOSRCiWpRB+R9HSuiKS4pX6JrLldkBS UfMTgQSlp8w/O7mmUMkEXELkQbb4AvNaXhFR8L/I7Qeh1d3Rqxpxa5o0qCEEEd0muFOd XjfQhMBSGfgdYDAkEQ5biN4xgrkqeZR9vyqfQbAKhO31EB3rD2QfJFTwRdCWbWwiGE8n iR/5S7RDSEUSibgGf94vlh0otHYD3WjVPVHbZo5zmLldO0BHIGKR+poK/vcrT8Fvfh1O wpZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=B1HLF6zdWK+G6VmVP84eyW7NaYb38ri7n17m7dR09Qc=; fh=Vr1Td+7qQ6XtZNcNXq6FkJeLRTopXefc/04D11YiJ1U=; b=F7pQwOH5ff4bSWKd05WGBjXPR8qUTdle2TqP2c0LrgaCvhxHqDqVGwGIAWDsQM1Dwy Hcym5S0Q/EXa8K3CgZ8I1/sLwYsIpU6+ujbV75ca/rLA0FXuIn21qqLipxJ+01d07tQE a3PBbNqfEtWCLzwkbZva6cU1OieJNxLJxtr9zlDtW4/csa5/bZDPVzgnN4cX+NCNHbNq D6LW9YBo/0AFOw5+5Bv094WuZrDDxCbYsbPLvGLExOzqMU0VAzIZy002jFT1hsoETuOR bRCG29Y6OdCXNT8wDquOjBuQ9vsVevRdKwKOHiY50IviE5fiifea2qByIirK/+erpr0O gaBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=Ew97772B; arc=pass (i=1 dkim=pass dkdomain=linux.org.uk dmarc=pass fromdomain=zeniv.linux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-145851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145851-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 21-20020ac85755000000b004346fe9f336si10464517qtx.808.2024.04.15.12.57.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:57:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=Ew97772B; arc=pass (i=1 dkim=pass dkdomain=linux.org.uk dmarc=pass fromdomain=zeniv.linux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-145851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145851-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5C78C1C21261 for ; Mon, 15 Apr 2024 19:57:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F05E515887C; Mon, 15 Apr 2024 19:55:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="Ew97772B" Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [62.89.141.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1001215885D for ; Mon, 15 Apr 2024 19:55:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.89.141.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713210910; cv=none; b=eP3XOEdDY+bo/lfd6Z5ryUGWGMngnAzBn0P9Sk7L2tYqU7GNKoDJfLf9uUWzuQjtQKIpZ5gKNsOejHeX0Lp2Fs6LgmcZqAISZSE9rcOcUG8PL8yq2BpD2TPfAiLTeiJrALd1YRYaAVyBNYwqVrSvQk96csSi/2axn6+Q1O7wS78= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713210910; c=relaxed/simple; bh=8nhccozgYNxEq/0Gqr6wadVOlq4H+k7Sr6gRN4VI98w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=E0Z2clSxs7gNovUGpGnO4ZZQX/qYgMME9l+daxeEJQ+8IrRARwY6gecA3t1NlCVbaBzFKYV0ChwSMg8D7+wn+sdK6viGzxKZZ1WO2vHXLNz6htmWoU0z/PG7KrSny/v63fSRQonCU84Aua/s+a/IkelUaBX0wEtSm7VBsD4kXW4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk; spf=none smtp.mailfrom=ftp.linux.org.uk; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b=Ew97772B; arc=none smtp.client-ip=62.89.141.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ftp.linux.org.uk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=B1HLF6zdWK+G6VmVP84eyW7NaYb38ri7n17m7dR09Qc=; b=Ew97772BmDT/aZed+egpCrTuJp 6kYOsNtvQvc8GNTxQaHSeRqfV1k52pbD06MG5Si1XzgUP2bYT+bBZpAKYvwSwLdv/h66tn0PkA1YV ucyeaU9KhnaDLTD9y+yMyN5IsyKztpOdzSeyfUPX6vVHRg1BrdifzD6NvmzO+pvSETSC7u2wedjzT f8zT9dd8c8B35zhqM7M38VFAib1mVQUKTbadtI3hs60s7SALNViZrpEBAZ4csxgLc5yhTC+uyDyin MN8UXIZpVEzyvPG5NlMKbZj5hitLQnAaNpEg/j5sWZe/h3lLjpH5ijv2Ri3xSP13d80A6cIttV7Rd u6XPTqzQ==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1rwSPw-00CzAg-39; Mon, 15 Apr 2024 19:55:05 +0000 Date: Mon, 15 Apr 2024 20:55:04 +0100 From: Al Viro To: Jens Axboe Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH 002/437] fs: add generic read/write iterator helpers Message-ID: <20240415195504.GU2118490@ZenIV> References: <20240411153126.16201-1-axboe@kernel.dk> <20240411153126.16201-3-axboe@kernel.dk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240411153126.16201-3-axboe@kernel.dk> Sender: Al Viro On Thu, Apr 11, 2024 at 09:12:22AM -0600, Jens Axboe wrote: > +/* generic read side helper for drivers converting to ->read_iter() */ > +ssize_t vfs_read_iter(struct kiocb *iocb, struct iov_iter *to, > + ssize_t (*read)(struct file *, char __user *, > + size_t, loff_t *)) > +{ > + return do_loop_readv(iocb->ki_filp, to, &iocb->ki_pos, 0, read); > +} > +EXPORT_SYMBOL(vfs_read_iter); > + > +/* generic write side helper for drivers converting to ->write_iter() */ > +ssize_t vfs_write_iter(struct kiocb *iocb, struct iov_iter *from, > + ssize_t (*write)(struct file *, const char __user *, > + size_t, loff_t *)) > +{ > + return do_loop_writev(iocb->ki_filp, from, &iocb->ki_pos, 0, write); > +} > +EXPORT_SYMBOL(vfs_write_iter); Wait a minute; just what do you expect to happen if that ever gets called for ITER_BVEC or ITER_XARRAY?