linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk
Cc: Jens Axboe <axboe@suse.de>
Subject: Re: [PATCH] splice: allow direct splicing with chardevs
Date: Fri, 20 May 2022 08:34:25 -0600	[thread overview]
Message-ID: <938111ca-d3c7-9888-24f8-0017a989002b@kernel.dk> (raw)
In-Reply-To: <20220520095747.123748-1-Jason@zx2c4.com>

On 5/20/22 3:57 AM, Jason A. Donenfeld wrote:
> The original direct splicing mechanism from Jens required the input to
> be a regular file because it was avoiding the special socket case. It
> also recognized blkdevs as being close enough to a regular file. But it
> forgot about chardevs, which behave the same way and work fine here.
> 
> This commit adds the missing S_ISCHR condition so that chardevs such as
> /dev/urandom can be directly spliced without strangely returning
> -EINVAL.

Should be fine to turn this on for char devices:

Reviewed-by: Jens Axboe <axboe@kernel.dk>

-- 
Jens Axboe


  reply	other threads:[~2022-05-20 14:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20  9:57 [PATCH] splice: allow direct splicing with chardevs Jason A. Donenfeld
2022-05-20 14:34 ` Jens Axboe [this message]
2022-05-26 21:19   ` Jason A. Donenfeld
2022-06-08 12:49     ` Jason A. Donenfeld

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=938111ca-d3c7-9888-24f8-0017a989002b@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=Jason@zx2c4.com \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).