public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Jens Axboe <axboe@kernel.dk>, Theodore Ts'o <tytso@mit.edu>,
	Christoph Hellwig <hch@lst.de>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 1/3] random: convert to using fops->read_iter()
Date: Fri, 20 May 2022 15:12:34 +0000	[thread overview]
Message-ID: <Yoev4rwdiB9pifYT@zeniv-ca.linux.org.uk> (raw)
In-Reply-To: <YoeoLWTQ29bZCOFI@zx2c4.com>

On Fri, May 20, 2022 at 04:39:41PM +0200, Jason A. Donenfeld wrote:
> Hi Jens,
> 
> On Fri, May 20, 2022 at 08:36:17AM -0600, Jens Axboe wrote:
> > On 5/20/22 7:37 AM, Jason A. Donenfeld wrote:
> > > On Fri, May 20, 2022 at 11:44:57AM +0200, Jason A. Donenfeld wrote:
> > >>  const struct file_operations urandom_fops = {
> > >> -	.read = urandom_read,
> > >> +	.read_iter = urandom_read_iter,
> > > 
> > > One thing I noticed is that drivers/char/mem.c has both the .read and
> > > the .read_iter functions for /dev/zero and /dev/null and such. I wonder
> > > if the .read ones can be removed?
> > 
> > I'm not sure if we have a clear "always use this if available" set of
> > rules for this. Ideally we'd want it to be:
> > 
> > 1) Use ->read_iter() if available
> > 2) If not, use ->read()
> > 
> > Might require a bit of auditing to ensure that's the case, and if we
> > can say that it is, then we could clean that up too.
> 
> The only case I found where it wasn't in that order was:
> https://lore.kernel.org/lkml/20220520135103.166972-1-Jason@zx2c4.com/

See reply to another mail.  Again, we might be able to retire infinibarf,
but /dev/snd/pcm* is somewhat more entrenched.

  reply	other threads:[~2022-05-20 15:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20  9:44 [PATCH v4 0/3] random: convert to using iters, for Al Viro Jason A. Donenfeld
2022-05-20  9:44 ` [PATCH v4 1/3] random: convert to using fops->read_iter() Jason A. Donenfeld
2022-05-20 13:37   ` Jason A. Donenfeld
2022-05-20 14:36     ` Jens Axboe
2022-05-20 14:39       ` Jason A. Donenfeld
2022-05-20 15:12         ` Al Viro [this message]
2022-05-20  9:44 ` [PATCH v4 2/3] random: convert to using fops->write_iter() Jason A. Donenfeld
2022-05-20  9:44 ` [PATCH v4 3/3] random: wire up fops->splice_{read,write}_iter() Jason A. Donenfeld
2022-05-20 12:16 ` [PATCH v4 0/3] random: convert to using iters, for Al Viro Jens Axboe
2022-05-20 15:25 ` Jason A. Donenfeld
2022-05-20 15:34   ` Jens Axboe
2022-05-20 15:39     ` Jason A. Donenfeld
2022-05-20 15:44       ` Jens Axboe
2022-05-20 15:55         ` Jason A. Donenfeld
2022-05-20 15:58           ` Jens Axboe
2022-05-20 16:03             ` Jason A. Donenfeld
2022-05-20 16:06               ` Jens Axboe
2022-05-20 15:46     ` Jason A. Donenfeld
2022-05-20 15:51       ` Jens Axboe
2022-05-20 15:58         ` Jason A. Donenfeld
2022-05-20 16:00           ` Jens Axboe
2022-05-20 15:47     ` Al Viro
2022-05-20 15:53       ` Jens Axboe
2022-05-20 16:15         ` Al Viro
2022-05-20 16:24           ` Jens Axboe
2022-05-20 16:39             ` Jason A. Donenfeld
2022-05-20 16:41               ` Jens Axboe
2022-05-24  4:52                 ` Eric W. Biederman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yoev4rwdiB9pifYT@zeniv-ca.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=Jason@zx2c4.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox