Re: [PATCH 00/10] iov_iter: Add new iters and use with AFS

2018-09-13 Thread Al Viro
On Thu, Sep 13, 2018 at 04:51:35PM +0100, David Howells wrote: > > Hi Al, > > Here's a set of patches that adds two new iov_iter types and then makes AFS > use them to do I/O. The iov_iter changes are: > > (1) Separate the type from the direction in the iov_iter struct and > provide acces

Re: [PATCH 00/10] iov_iter: Add new iters and use with AFS

2018-09-13 Thread David Howells
Matthew Wilcox wrote: > It might serve to replace iov_iter_zero(). I don't think it can work like that. iov_iter_zero() writes zeros into an iterator someone else set up. To use ITER_ZERO, you'd be setting up the iterator and passing it to someone else to comsume. I think these are at opposit

Re: [PATCH 00/10] iov_iter: Add new iters and use with AFS

2018-09-13 Thread Matthew Wilcox
On Thu, Sep 13, 2018 at 05:18:23PM +0100, David Howells wrote: > 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_

Re: [PATCH 00/10] iov_iter: Add new iters and use with AFS

2018-09-13 Thread David Howells
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 (

Re: [PATCH 00/10] iov_iter: Add new iters and use with AFS

2018-09-13 Thread Matthew Wilcox
On Thu, Sep 13, 2018 at 04:51:35PM +0100, David Howells 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/z

[PATCH 00/10] iov_iter: Add new iters and use with AFS

2018-09-13 Thread David Howells
Hi Al, Here's a set of patches that adds two new iov_iter types and then makes AFS use them to do I/O. The iov_iter changes are: (1) Separate the type from the direction in the iov_iter struct and provide accessor functions to wrap type checking. (2) Renumber the type constants to be c

[PATCH 00/10] iov_iter: Add new iters and use with AFS

2018-08-06 Thread David Howells
Hi Al, Here's a set of patches that adds two new iov_iter types and then makes AFS use them to do I/O. The iov_iter changes are: (1) Separate the type from the direction in the iov_iter struct and provide accessor functions to wrap type checking. (2) Renumber the type constants to be c