From: NeilBrown <neilb-l3A5Bk7waGM@public.gmane.org>
To: "Michael Kerrisk (man-pages)"
<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "Aneesh Kumar K.V"
<aneesh.kumar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
"linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Linux-Fsdevel
<linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Andreas Dilger <adilger-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>,
Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Subject: Re: For review: open_by_name_at(2) man page [v2]
Date: Wed, 19 Mar 2014 15:13:49 +1100 [thread overview]
Message-ID: <20140319151349.33a76023@notabene.brown> (raw)
In-Reply-To: <53284233.3050800-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3105 bytes --]
On Tue, 18 Mar 2014 13:55:15 +0100 "Michael Kerrisk (man-pages)"
<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi Aneesh, (and others)
>
> After integrating review comments from NeilBown and Christoph Hellwig,
> here is draft 2 of a man page I've written for name_to_handle_at(2) and
> open_by_name_at(2). Especially thanks to Neil's comments, several parts
> of the page underwent a substantial rewrite. Would you be willing to
> review it please, and let me know of any corrections/improvements?
I didn't notice before but above and in $SUBJ I see "open_by_name_at", which
is fictitious :-)
>
> Together, the
> .I pathname
> and
> .I dirfd
> arguments identify the file for which a handle is to obtained.
^be
>
> The
> .I flags
> argument is a bit mask constructed by ORing together
> zero or more of the following value:
^s
> .TP
> .B AT_EMPTY_PATH
> Allow
> .I pathname
> to be an empty string.
> See above.
> (which may have been obtained using the
> .BR open (2)
> .B O_PATH
> flag).
What "may have been obtained" ??
> The
> .I flags
> argument
> is as for
> .BR open (2).
> .\" FIXME: Confirm that the following is intended behavior.
> .\" (It certainly seems to be the behavior, from experimenting.)
> If
> .I handle
> refers to a symbolic link, the caller must specify the
> .B O_PATH
> flag, and the symbolic link is not dereferenced (the
> .B O_NOFOLLOW
> flag, if specified, is ignored).
It certainly sounds like reasonable behaviour. I cannot comment on intention
though.
Are you bothered that O_PATH is needed for symlinks? An fd on a symlink is a
sufficiently unusual thing that it seems reasonable for a programmer to
explicitly say they are expecting one.
>
> In the event of an error, both system calls return \-1 and set
> .I errno
> to indicate the cause of the error.
> .SH ERRORS
> .BR name_to_handle_at ()
> and
> .BR open_by_handle_at ()
> can fail for the same errors as
> .BR openat (2).
> In addition, they can fail with the errors noted below.
Should you mention EFAULT if mount_id or handle are not valid pointers?
>
> Not all filesystem types support the translation of pathnames to
> file handles.
> .\" FIXME NeilBrown noted:
> .\" ESTALE is also returned if the filesystem does not support
> .\" file-handle -> file mappings.
> .\" On filesystems which don't provide export_operations (/sys /proc
> .\" ubifs romfs cramfs nfs coda ... several others) name_to_handle_at
> .\" will produce a generic handle using the 32 bit inode and 32 bit
> .\" i_generation. open_by_name_at given this (or any) filehandle
> .\" will fail with ESTALE.
> .\" However, on /proc and /sys, at least, name_to_handle_at() fails with
> .\" EOPNOTSUPP. Are there really filesystems that can deliver ESTALE (the
> .\" same error as for an invalid file handle) in the above circumstances?
This is all wrong - discard it :-)
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2014-03-19 4:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 15:57 For review: open_by_name_at(2) man page Michael Kerrisk (man-pages)
2014-03-17 22:00 ` NeilBrown
2014-03-18 9:43 ` Christoph Hellwig
2014-03-18 12:37 ` Michael Kerrisk (man-pages)
[not found] ` <53283DFB.6040105-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-03-18 22:24 ` NeilBrown
2014-03-19 9:09 ` Michael Kerrisk (man-pages)
[not found] ` <20140318090007.3adee3d0-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-03-18 12:35 ` Michael Kerrisk (man-pages)
2014-03-18 13:07 ` Christoph Hellwig
2014-03-18 13:30 ` Michael Kerrisk (man-pages)
2014-03-18 9:37 ` Christoph Hellwig
2014-03-18 12:41 ` Michael Kerrisk (man-pages)
2014-03-18 12:55 ` For review: open_by_name_at(2) man page [v2] Michael Kerrisk (man-pages)
[not found] ` <53284233.3050800-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-03-19 4:13 ` NeilBrown [this message]
[not found] ` <20140319151349.33a76023-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-03-19 9:09 ` Michael Kerrisk (man-pages)
[not found] ` <53295ED0.7070304-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-03-19 14:14 ` For review: open_by_handle_at(2) man page [v3] Michael Kerrisk (man-pages)
2014-03-19 6:42 ` For review: open_by_name_at(2) man page [v2] Mike Frysinger
2014-03-19 13:11 ` Michael Kerrisk (man-pages)
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=20140319151349.33a76023@notabene.brown \
--to=neilb-l3a5bk7wagm@public.gmane.org \
--cc=adilger-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org \
--cc=aneesh.kumar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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;
as well as URLs for NNTP newsgroup(s).