lkml.org 
[lkml]   [2020]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 17/23] proc: add a read_iter method to proc proc_ops
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 cases they are not equivalent. Sure, ->read() takes
> precedence right now, but... why not a separate file_operations for
> ->read_iter-capable files?

I looked at that initially. We'd need to more instances as there
already are two due to compat stuff. If that is preferably I can
switch to that version.

> I really hate the fallbacks of that sort - they tend to be brittle
> as hell. And while we are at it, I'm not sure that your iter_read()
> has good cause to be non-static.

The other user of it is seq_file, which as-is should go away, but
will probably keep the occasional version of it in the caller. I just
got really tired of reimplementing it a few times.

\
 
 \ /
  Last update: 2020-07-02 07:19    [W:0.063 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site