All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>,
	linux-man@vger.kernel.org
Subject: Re: [PATCH] sendfile.2: pull in_fd type requirements up to 6.7
Date: Thu, 21 Dec 2023 12:08:30 +0100	[thread overview]
Message-ID: <ZYQctE0y1UTy6VvK@debian> (raw)
In-Reply-To: <tovce255glwqzbrwuwk3ijzzrww3si4q3jdoh4sdw5zgah7ki7@tarta.nabijaczleweli.xyz>

[-- Attachment #1: Type: text/plain, Size: 1639 bytes --]

Hey наб,

> Cc: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>

Please use <alx@kernel.org>; I'm deprecating my gmail account.

On Thu, Dec 21, 2023 at 02:31:35AM +0100, наб wrote:
> But this does mean that since 5.12 supports

Did you mean "since 5.12, _it_ supports"?

> (5.12 has ISREG|ISBLK, this actually matches 6.0 semantics):
>   any      -> pipe  via splice
>   seekable -> any
> 
> Also, there are many seekable files which aren't regular,
> and the offset is updated regardless.
> This is obvious, but the wording is clumsy.
> 
> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
> ---
>  man2/sendfile.2 | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/man2/sendfile.2 b/man2/sendfile.2
> index 24de71072..a385949c1 100644
> --- a/man2/sendfile.2
> +++ b/man2/sendfile.2
> @@ -91,12 +91,21 @@ .SH DESCRIPTION
>  .BR mmap (2)-like
>  operations
>  (i.e., it cannot be a socket).
> +Except since Linux 5.12
> +.\" commit b964bf53e540262f2d12672b3cca10842c0172e7
> +and if
> +.I out_fd
> +is a pipe, in which case
> +.BR sendfile ()
> +desugars to a
> +.BR splice (2)
> +and its restrictions apply.
>  .P
>  Before Linux 2.6.33,
>  .I out_fd
>  must refer to a socket.
>  Since Linux 2.6.33 it can be any file.
> -If it is a regular file, then
> +If it's seekable, then
>  .BR sendfile ()
>  changes the file offset appropriately.
>  .SH RETURN VALUE
> -- 
> 2.39.2

LGTM.

Have a lovely day,
Alex

-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-12-21 11:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21  1:31 [PATCH] sendfile.2: pull in_fd type requirements up to 6.7 наб
2023-12-21 11:08 ` Alejandro Colomar [this message]
2023-12-21 13:29   ` наб
2023-12-21 13:41     ` Alejandro Colomar

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=ZYQctE0y1UTy6VvK@debian \
    --to=alx@kernel.org \
    --cc=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.