From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:39692 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750886AbdALLhu (ORCPT ); Thu, 12 Jan 2017 06:37:50 -0500 Date: Thu, 12 Jan 2017 11:37:43 +0000 From: Al Viro To: Ilya Dryomov Cc: Jeff Layton , "Yan, Zheng" , Sage Weil , Ceph Development , linux-fsdevel , "linux-kernel@vger.kernel.org" , "Zhu, Caifeng" Subject: Re: [PATCH v2] ceph/iov_iter: fix bad iov_iter handling in ceph splice codepaths Message-ID: <20170112113743.GX1555@ZenIV.linux.org.uk> References: <1483727016-343-1-git-send-email-jlayton@redhat.com> <1484053051-23685-1-git-send-email-jlayton@redhat.com> <20170112075946.GU1555@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Jan 12, 2017 at 12:13:31PM +0100, Ilya Dryomov wrote: > It would be a significant and wide-reaching change, but I've been > meaning to look into switching to iov_iter for a couple of releases > now. There is a lot of ugly code in net/ceph/messenger.c to hangle > iteration over "page vectors", "page lists" and "bio lists". All of it > predates iov_iter proliferation and is mostly incomplete anyway: IIRC > you can send out of a pagelist but can't recv into a pagelist, etc. Wait a sec... Is it done from the same thread that has issued a syscall? If so, we certainly could just pass iov_iter without bothering with any form of ..._get_pages(); if not, we'll need at least to get from iovec to bio_vec, since userland addresses make sense only in the caller's context...