Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp895092imm; Thu, 13 Sep 2018 09:19:18 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaFEitoJjBF6fjpu9lMmMFkxfFmX0BEVPOwUbso6+92uti+UC9PcBHrdTu4BbhMKRsQOg2X X-Received: by 2002:a17:902:24d:: with SMTP id 71-v6mr7957874plc.91.1536855558683; Thu, 13 Sep 2018 09:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536855558; cv=none; d=google.com; s=arc-20160816; b=lKHRBOJVJJogtGwTEUEz1V32mJ2u2kSQNk8X76pvt9BaVsnAGqOxl/pMqkVypEV1ri 6VNPYO6H4qn/gb+VEW8CuBLABeb3Tp8esk02iuu+4/pMWD7csG3cbmNXtcv5L2OoAHGO NNb2Dotb/aJVwebOzme3U6RJ7qZWtm7AB1VN4bjOk7SahrQOTUER4yZZfvG+x13l2g7L 9qiFAwR2y0MlDNrrGDxoShcR6uUh7kNbXS/QQWEnWPm56T4ajOONSYJVM28meHdXUUmS IRK9wy2FZ7+g4SnEIL8YyJA9sWzqUcfabedehCj3CCoIzdnjcMG9Q2ztaRJ+x6MHpcFT pAZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization; bh=dnI7VEEjgRBTGGjQQZJGiVPBiW3UmjqfEhFBI0xItls=; b=p5s3D5rjkD4vWzq1N34OM3HM9jZncEnJjS5RLzdY3aEZ/RFmkLl01EpbGGDGorNI0k mw9Tnj7lJPuU0CyIkVe7NrSGQEucGotXzqJHu6kBhn623JdO/GOKhw5NicpKMTp9t2mr 0ZsmMVoBjNMRj2JRKt8ENj9RBKjYoKIFb7I2Fnd6ggdufwAb9aVomk26F0OaG+/YWKWK F0xmub+YoTxs/ViZyNafe/iKDxf9831qcn4wLAGjPgH5o0n9X29dBiGMjCdzg1g+9lF9 6nxeoy51wOMhKP50froGC4DFTYv4NGgKNNwIGRgRb8B+AtQ/NpL07kKJit231Bb0zx4H gn1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1-v6si4233580plt.325.2018.09.13.09.19.03; Thu, 13 Sep 2018 09:19:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728398AbeIMV2h (ORCPT + 99 others); Thu, 13 Sep 2018 17:28:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37728 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727413AbeIMV2h (ORCPT ); Thu, 13 Sep 2018 17:28:37 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CD450C058CB7; Thu, 13 Sep 2018 16:18:25 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-123-84.rdu2.redhat.com [10.10.123.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id A398B600D1; Thu, 13 Sep 2018 16:18:24 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20180913161054.GB11574@bombadil.infradead.org> References: <20180913161054.GB11574@bombadil.infradead.org> <153685389564.14766.11306559824641824935.stgit@warthog.procyon.org.uk> To: Matthew Wilcox Cc: dhowells@redhat.com, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 00/10] iov_iter: Add new iters and use with AFS MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17351.1536855503.1@warthog.procyon.org.uk> Date: Thu, 13 Sep 2018 17:18:23 +0100 Message-ID: <17352.1536855503@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 13 Sep 2018 16:18:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Matthew Wilcox wrote: > > (5) Add an ITER_DISCARD iterator type. This provides an iterator that > > simply discards anything written to it. It cannot be used as a data > > source. > > May I suggest an ITER_ZERO iterator type instead? It acts like /dev/zero; > writes are discarded (as you have here) and reads return zeroes. > I've wanted such a thing in the past, but got distracted away from > that project. I thought about that, but the zero-filling is not as easy to implement as the discard side - plus I don't have any use case to test it with. Do you have a use case in mind? David