Re: [PATCH 17/23] proc: add a read_iter method to proc proc_ops

2020-07-02 Thread Christoph Hellwig
On Thu, Jul 02, 2020 at 07:18:11AM +0200, Christoph Hellwig wrote: > On Wed, Jul 01, 2020 at 10:27:51PM +0100, Al Viro wrote: > > On Wed, Jul 01, 2020 at 10:09:45PM +0200, Christoph Hellwig wrote: > > > This will allow proc files to implement iter read semantics. > > > > *UGH* > > > > You are

Re: [PATCH 17/23] proc: add a read_iter method to proc proc_ops

2020-07-01 Thread Christoph Hellwig
On Wed, Jul 01, 2020 at 10:27:51PM +0100, Al Viro wrote: > On Wed, Jul 01, 2020 at 10:09:45PM +0200, Christoph Hellwig wrote: > > This will allow proc files to implement iter read semantics. > > *UGH* > > You are introducing file_operations with both ->read() and ->read_iter(); > worse, in some

Re: [PATCH 17/23] proc: add a read_iter method to proc proc_ops

2020-07-01 Thread Al Viro
On Wed, Jul 01, 2020 at 10:09:45PM +0200, Christoph Hellwig wrote: > This will allow proc files to implement iter read semantics. *UGH* You are introducing file_operations with both ->read() and ->read_iter(); worse, in some cases they are not equivalent. Sure, ->read() takes precedence right

[PATCH 17/23] proc: add a read_iter method to proc proc_ops

2020-07-01 Thread Christoph Hellwig
This will allow proc files to implement iter read semantics. Signed-off-by: Christoph Hellwig --- fs/proc/inode.c | 28 include/linux/proc_fs.h | 1 + 2 files changed, 29 insertions(+) diff --git a/fs/proc/inode.c b/fs/proc/inode.c index