From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:51030 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725842AbeLAG2G (ORCPT ); Sat, 1 Dec 2018 01:28:06 -0500 Date: Fri, 30 Nov 2018 19:17:47 +0000 From: Al Viro To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, hch@lst.de Subject: Re: [PATCH 26/27] iov_iter: add import_kvec() Message-ID: <20181130191747.GO2217@ZenIV.linux.org.uk> References: <20181130165646.27341-1-axboe@kernel.dk> <20181130165646.27341-27-axboe@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181130165646.27341-27-axboe@kernel.dk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Nov 30, 2018 at 09:56:45AM -0700, Jens Axboe wrote: > This explicitly sets up an ITER_KVEC from an iovec with kernel ranges > mapped. > +int import_kvec(int type, const struct kvec *kvecs, unsigned nr_segs, > + size_t bytes, struct iov_iter *iter) > +{ > + const struct iovec *p = (const struct iovec *) kvecs; > + > + iov_iter_init_type(iter, ITER_KVEC, type, p, nr_segs, bytes); > + return 0; > +} What the hell is wrong with existing iov_iter_kvec()?