Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp394287rwb; Thu, 12 Jan 2023 22:07:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXtguHw7+aax4nZTcDoRdn2N1ZvB8g4xjPxnt7X+ldbqMM5HShhidhUeSRSt0z4ggOZhje9I X-Received: by 2002:a62:1791:0:b0:578:8533:9573 with SMTP id 139-20020a621791000000b0057885339573mr69542044pfx.22.1673590048297; Thu, 12 Jan 2023 22:07:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673590048; cv=none; d=google.com; s=arc-20160816; b=YIWGpHG6mkAsd8VFjCSYcZSxSSsEewZVFPsrwhzAkTEBSUUlGwLAxCoItII+Z/DFt5 h8jGWgrz3X/pc0ZZIHiB1tf6TkeNm6xzw2d/SNkGJ6QdbGSJkZdd71RrQqzgCnQ3FCac djoxvxteljuXStNpXGlpaUTFVjPcLxTdaVCKUqjuhoLTpZA/tg3jy0hMM0UPT+hDMgZD DVBAYovPsKCmsUtKaJW4yRrKyPYHeO82jPSKn/Bj/ZxI7vrgUuKiHuiP/8kT/zMOwjoS dBZe6IiEMnFJT2gVz7HF7yplSS/s6U+mHp3+wEGe7ueJ/J4dwHMelx9mLFeRvz07FR7d X2FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jrUNW0xvWBPVni6kRybH/pnEJwmHcW0kAeuuygbCWoQ=; b=lOYfKSJcQvUaXlGXPTPWc+NtGshBqDh/Eyd18O9BPmxwPR7G9t4CFeeQCkUUM75Wf5 D0V4q36emnhawglhAH5Ro7C5MSMuknZQUXbBa6ZfoU39gI7XHBATy++UzX9VU7iaQz1g 5+eT1ezyOomoKSV+Agm6FWC74HAs8e+0Oary4+sM+SUuWVrJmz/VI1jwjxfMcNmtV6LI b+8HNcJrqGVKJEM245yRohTfWwS/Xpz2boZRqQL1V+f6avDjaSxeOEAzIs0fJdImUbz4 BccqBxu1V+9YGy7/wjlJQRA0/bSc/+kxmqKzd8pDZD4DS3GZfzaP4NDI8sZN2XhKaTAL Tvtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=UgohmtQp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t24-20020a62d158000000b0058baf82d78fsi2667238pfl.74.2023.01.12.22.07.22; Thu, 12 Jan 2023 22:07:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=UgohmtQp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232913AbjAMFbe (ORCPT + 50 others); Fri, 13 Jan 2023 00:31:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234010AbjAMFaj (ORCPT ); Fri, 13 Jan 2023 00:30:39 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7442262191; Thu, 12 Jan 2023 21:30:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=jrUNW0xvWBPVni6kRybH/pnEJwmHcW0kAeuuygbCWoQ=; b=UgohmtQp7jIUoaBa1Vo/vb8yqI Q52BrZrOyE6yqQHYWt64OFIeUBtdL7/4p3f3y08dcdM7ThVYhgDVNEUG0wr+y1wYhkkLzwEFJolR3 1KtB9755ALoc9mSUEnZjjdCddlACdu9+YlJp8Kn3OV//MhuA3dIv/mbSnxRwYGVvDkAbxCGvFbnpK +QEzBluchlXTr5YC5Ft7wUawwZkxWJB1AsplUQd4XQRzFQovlLQlhkEP2IcX8mA8FQ5S/YtvJQbF2 W6RR50AVfNM4hZd0Xgif3p70XCQaaSZQCeI7MddCsJ//e0BhnBbMp4FXgwad38H8PkKVMmPELvRws tlxUF0jg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGCe7-000V7w-Sc; Fri, 13 Jan 2023 05:30:31 +0000 Date: Thu, 12 Jan 2023 21:30:31 -0800 From: Christoph Hellwig To: Al Viro Cc: Christoph Hellwig , David Howells , Matthew Wilcox , Jens Axboe , Jan Kara , Jeff Layton , Logan Gunthorpe , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds Subject: Re: [PATCH v5 3/9] iov_iter: Use IOCB/IOMAP_WRITE if available rather than iterator direction Message-ID: References: <167344725490.2425628.13771289553670112965.stgit@warthog.procyon.org.uk> <167344727810.2425628.4715663653893036683.stgit@warthog.procyon.org.uk> <15330.1673519461@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 12, 2023 at 05:37:26PM +0000, Al Viro wrote: > I have no problem with getting rid of iov_iter_rw(), but I would really like to > keep ->data_source. If nothing else, any place getting direction wrong is > a trouble waiting to happen - something that is currently dealing only with > iovec and bvec might be given e.g. a pipe. But the calling code knows the direction, in fact it is generally encoded in the actual operation we do on the iov_iter. The only exception is iov_iter_get_pages and friends. So I'd much rather pass make the lass operation that does not explicitly encode a direction explicit rather than carrying this duplicate information. The direction of the iov_iter has been a major source of confusing, and getting rid of it removes that confusion.