From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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