public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, linux-man <linux-man@vger.kernel.org>
Cc: mtk.manpages@gmail.com
Subject: Re: [PATCH v2] man2/openat2.2: add RESOLVE_CACHED
Date: Sun, 21 Feb 2021 10:04:07 +0100	[thread overview]
Message-ID: <176b27df-d7e1-7023-b999-fe24aa344585@gmail.com> (raw)
In-Reply-To: <358adcb0-0270-c0aa-b3cc-967cb133fed8@kernel.dk>

Hello Jens

Thanks for the revised patch. Just some minor comments below.

On 2/20/21 8:17 PM, Jens Axboe wrote:
> RESOLVE_CACHED allows an application to attempt a cache-only open
> of a file. If this isn't possible, the request will fail with
> -1/EAGAIN and the caller should retry without RESOLVE_CACHED set.
> This will generally happen from a different context, where a slower
> open operation can be performed.
> 
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> 
> ---
> 
> Sending a v2 of this one, as the kernel side patches are queued up
> for 5.12 inclusion.
> 
> diff --git a/man2/openat2.2 b/man2/openat2.2
> index 3bda20620574..37e70c43de6d 100644
> --- a/man2/openat2.2
> +++ b/man2/openat2.2
> @@ -385,6 +385,17 @@ This may occur if, for example,
>  a system pathname that is used by an application is modified
>  (e.g., in a new distribution release)
>  so that a pathname component (now) contains a bind mount.
> +.TP
> +.B RESOLVE_CACHED
> +Make the open operation fail unless all path components are already present
> +in the kernels lookup cache.

s/kernels/kernel's/

> +If any kind of revalidation or I/O is needed to satisfy the lookup,
> +.BR openat2 ()
> +fails with the error
> +.B EAGAIN.

.BR EAGAIN .

> +This is useful in providing a fast path open that can be performed without

s/fast path open/fast-path open/

> +resorting to thread offload, or other mechanisms that an application might
> +use to offload slower operations.
>  .RE
>  .IP
>  If any bits other than those listed above are set in
> @@ -421,6 +432,14 @@ The caller may choose to retry the
>  .BR openat2 ()
>  call.
>  .TP
> +.B EAGAIN
> +.BR RESOLVE_CACHED
> +was set, and the open operation cannot be performed cached.

Maybe:
s/cached
 /using only cached information/
?

> +The caller should retry without
> +.B RESOLVE_CACHED
> +set in
> +.I how.resolve

.IR how.resolve .

> +.TP
>  .B EINVAL
>  An unknown flag or invalid value was specified in
>  .IR how .

Thanks,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

  reply	other threads:[~2021-02-21  9:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-20 19:17 [PATCH v2] man2/openat2.2: add RESOLVE_CACHED Jens Axboe
2021-02-21  9:04 ` Michael Kerrisk (man-pages) [this message]
2021-02-21 13:11   ` Jens Axboe

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=176b27df-d7e1-7023-b999-fe24aa344585@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-man@vger.kernel.org \
    /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