Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965653AbbBCO1h (ORCPT ); Tue, 3 Feb 2015 09:27:37 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:39813 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933867AbbBCO1f (ORCPT ); Tue, 3 Feb 2015 09:27:35 -0500 Date: Tue, 3 Feb 2015 14:27:28 +0000 From: Al Viro To: "Michael S. Tsirkin" Cc: David Miller , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 08/17] {macvtap,tun}_get_user(): switch to iov_iter Message-ID: <20150203142728.GC29656@ZenIV.linux.org.uk> References: <20141125024018.GH7996@ZenIV.linux.org.uk> <1416924151-28698-8-git-send-email-viro@ZenIV.linux.org.uk> <20150203101044.GA5081@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150203101044.GA5081@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 921 Lines: 23 On Tue, Feb 03, 2015 at 12:10:44PM +0200, Michael S. Tsirkin wrote: > Hmm does copy_from_iter actually modify the iovec? > If so, won't this break aio on tun/macvtap, by > reversing the effect of > commit 6f26c9a7555e5bcca3560919db9b852015077dae > tun: fix tun_chr_aio_write so that aio works > ? > > > Maybe we should change iovec_iter to avoid modifying the > underlying iovec? iov_iter never changes the underlying iovec (or kvec, or bvec). iter->iov_offset changes as you go and once you have consumed an entire iovec element ->iov is incremented to point to the next one (and ->iov_offset is reset to 0 at that point). *Contents* of iter->iov is never modified. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/