From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:51066 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbeLAGbV (ORCPT ); Sat, 1 Dec 2018 01:31:21 -0500 Date: Fri, 30 Nov 2018 19:21:02 +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 24/27] block: implement bio helper to add iter kvec pages to bio Message-ID: <20181130192102.GP2217@ZenIV.linux.org.uk> References: <20181130165646.27341-1-axboe@kernel.dk> <20181130165646.27341-25-axboe@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181130165646.27341-25-axboe@kernel.dk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Nov 30, 2018 at 09:56:43AM -0700, Jens Axboe wrote: > For an ITER_KVEC, we can just iterate the iov and add the pages > to the bio directly. > + page = virt_to_page(kv->iov_base); > + size = bio_add_page(bio, page, kv->iov_len, > + offset_in_page(kv->iov_base)); Who said that you *can* do virt_to_page() on those? E.g. vmalloc()'ed addresses are fine for ITER_KVEC, etc.