linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: NeilBrown <neilb@suse.com>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org,
	Lennart Poettering <lennart@poettering.net>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH man-pages] open.2: improve O_PATH documentation.
Date: Sat, 12 Aug 2017 22:11:56 +0200	[thread overview]
Message-ID: <962508f3-52da-f5d7-06db-b60d99113398@gmail.com> (raw)
In-Reply-To: <873790rtni.fsf@notabene.neil.brown.name>

On 08/10/2017 05:25 AM, NeilBrown wrote:
> 
> - fstatfs is now permitted.
> - ioctl isn't, and is worth listing explicitly
> - O_PATH allows an automount point to be opened with
>   triggering the mount.
> 
> All tested

Thanks, Neil. Patch applied.

Cheers,

Michael


> Signed-off-by: NeilBrown <neilb@suse.com>
> ---
>  man2/open.2 | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/man2/open.2 b/man2/open.2
> index e3b00939790c..38d532397b02 100644
> --- a/man2/open.2
> +++ b/man2/open.2
> @@ -585,6 +585,7 @@ The file itself is not opened, and other file operations (e.g.,
>  .BR fchmod (2),
>  .BR fchown (2),
>  .BR fgetxattr (2),
> +.BR ioctl (2),
>  .BR mmap (2))
>  fail with the error
>  .BR EBADF .
> @@ -599,8 +600,11 @@ be performed on the resulting file descriptor:
>  (since Linux 3.5);
>  .\" commit 332a2e1244bd08b9e3ecd378028513396a004a24
>  .BR fstat (2)
> -(since Linux 3.6).
> +(since Linux 3.6);
>  .\" fstat(): commit 55815f70147dcfa3ead5738fd56d3574e2e3c1c2
> +.BR fstatfs (2)
> +(since Linux 3.12).
> +.\" fstatfs(): commit 9d05746e7b16d8565dddbe3200faa1e669d23bbf
>  .IP *
>  Duplicating the file descriptor
>  .RB ( dup (2),
> @@ -666,6 +670,16 @@ argument in calls to
>  and
>  .BR readlinkat (2)
>  with an empty pathname to have the calls operate on the symbolic link.
> +
> +If
> +.I pathname
> +refers to an automount point that has not yet been triggered, so no
> +other filesystem is mounted on it, then the call returns a file
> +descriptor referring to the automount directory without triggering a mount.
> +.BR fstatfs (2)
> +can then be used to determine if it is, in fact, an untriggered
> +automount point
> +.RB ( ".f_type == AUTOFS_SUPER_MAGIC" ).
>  .TP
>  .B O_SYNC
>  Write operations on the file will complete according to the requirements of
> 


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

      parent reply	other threads:[~2017-08-12 20:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10  3:25 [PATCH man-pages] open.2: improve O_PATH documentation NeilBrown
2017-08-10 10:21 ` Lennart Poettering
2017-08-10 14:02   ` Krzysztof Błaszkowski
2017-08-10 23:04     ` NeilBrown
2017-08-12 20:13       ` Michael Kerrisk (man-pages)
2017-08-10 15:50   ` Matthew Wilcox
2017-08-12 20:11 ` Michael Kerrisk (man-pages) [this message]

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=962508f3-52da-f5d7-06db-b60d99113398@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=lennart@poettering.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=neilb@suse.com \
    /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).