From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Rich Felker <dalias@libc.org>
Cc: mtk.manpages@gmail.com, Jeff Layton <jlayton@redhat.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
samba-technical@lists.samba.org,
Ganesha NFS List <nfs-ganesha-devel@lists.sourceforge.net>,
Carlos O'Donell <carlos@redhat.com>,
libc-alpha <libc-alpha@sourceware.org>,
"Stefan (metze) Metzmacher" <metze@samba.org>,
Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH] locks: rename file-private locks to file-description locks
Date: Mon, 21 Apr 2014 21:39:12 +0200 [thread overview]
Message-ID: <535573E0.9080106@gmail.com> (raw)
In-Reply-To: <20140421184640.GD26358@brightrain.aerifal.cx>
On 04/21/2014 08:46 PM, Rich Felker wrote:
> On Mon, Apr 21, 2014 at 08:32:44PM +0200, Michael Kerrisk (man-pages) wrote:
>> On 04/21/2014 06:10 PM, Rich Felker wrote:
>>> I'm well aware of that. The problem is that the proposed API is using
>>> the two-letter abbreviation FD, which ALWAYS means file descriptor and
>>> NEVER means file description (in existing usage) to mean file
>>> description. That's what's wrong.
>>
>> So, can you *please* answer this question: what do you call (i.e.,
>> what everyday technical language term do use for) the thing
>> that sits between a file descriptor and an i-node?
>>
>> (Please don't say 'struct file' -- that is not is an implementation
>> detail, and does not qualify as the kind of term that I could use
>> when documenting this feature in man pages.)
>
> "Open file description".
Oh! I didn't realize we agreed :-).
>> POSIX uses (or invented, I am not sure which) the term file description
>> for a good reason: it is unambiguous, and therefore precise. I do agree
>> that there's a risk of confusion between 'open file descriptor" and
>> 'and file description'--it's the same kind of risk as between English
>> terms such as 'arbitrator' and 'arbitration' (and any number of other
>> examples), and as language speakers we deal with this every day.
>
> There's not a problem when the full word is used. On the other hand,
> if you use "arb" as an abbreviation for "arbitration" in a context
> where it was already universally understood as meaning "arbitrator",
> that would be a big problem.
>
> Likewise the problem here isn't that "open file description" is a bad
> term. It's that using "FD" to mean "[open] file description" is
> utterly confusing, even moreso than just making up a new completely
> random word.
Ohh -- I had thought you a problem not just with "FD" but also
"(open) file description".
>>>> 2) The new API constants (F_SETLKP, F_SETLKPW, F_GETLKP) have names
>>>> that are visually very close to the traditional POSIX lock names
>>>> (F_SETLK, F_SETLKW, F_GETLK). That's an accident waiting to happen
>>>> when someone mistypes in code and/or misses such a misttyping
>>>> when reading code. That really must be fixed.
>>>
>>> I agree, but I don't think making it worse is a solution.
>>
>> I don't agree that it's making it worse. The real problem here is
>> that people use no good unambiguous term for the thing between a file
>> descriptor and an inode. POSIX provides us with a solution that may
>> not seem perfect, but it is unambiguous, and I think it might feel
>> more comfortable if we used it often enough.
>
> I would like to see it used more too, and in particular, I think it
> belongs in the documentation for these new locking interfaces. But
> that still doesn't answer the question of what to call them (the
> macros) unless you want:
>
> F_OPEN_FILE_DESCRIPTION_GETLK
> F_OPEN_FILE_DESCRIPTION_SETLK
> F_OPEN_FILE_DESCRIPTION_SETLKW
Or just 'F_OFD_*'?
> Perhaps "OP" (for open-private, i.e. private to the particular open)
> would be a sensible choice; OTOH people are likely to misread it as
> OPeration. The general principle I have in mind though is that it
> might be nice to highlight the word "open" in "open file description"
(Fair enough.)
> since it (1) contrasts with file descriptor, despite file descriptors
> also dealing with open files, and (2) contrasts well with legacy fcntl
> locks, which are (this is the whole bug) associated with the
> underlying file and not the open file description.
Makes sense to me. (We are in more agreement that I realized.)
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
next prev parent reply other threads:[~2014-04-21 19:39 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-21 13:45 [PATCH] locks: rename file-private locks to file-description locks Jeff Layton
2014-04-21 14:02 ` Rich Felker
2014-04-21 14:23 ` Michael Kerrisk (man-pages)
2014-04-21 16:09 ` Christoph Hellwig
2014-04-21 16:42 ` Jeff Layton
2014-04-21 17:03 ` [Nfs-ganesha-devel] " Frank Filz
2014-04-21 18:20 ` Michael Kerrisk (man-pages)
2014-04-21 16:10 ` Rich Felker
2014-04-21 16:45 ` Jeff Layton
2014-04-21 18:01 ` Andy Lutomirski
2014-04-21 18:43 ` Michael Kerrisk (man-pages)
2014-04-21 18:18 ` Michael Kerrisk (man-pages)
2014-04-21 18:32 ` Jeff Layton
2014-04-21 18:48 ` Rich Felker
2014-04-21 19:16 ` Jeff Layton
2014-04-21 20:22 ` Rich Felker
2014-04-21 18:32 ` Michael Kerrisk (man-pages)
2014-04-21 18:34 ` Christoph Hellwig
2014-04-21 18:39 ` Michael Kerrisk (man-pages)
2014-04-21 18:46 ` Rich Felker
2014-04-21 19:39 ` Michael Kerrisk (man-pages) [this message]
2014-04-21 19:55 ` Jeff Layton
2014-04-21 21:15 ` Stefan (metze) Metzmacher
2014-04-22 4:54 ` Michael Kerrisk (man-pages)
2014-04-27 4:51 ` NeilBrown
2014-04-27 9:14 ` Michael Kerrisk (man-pages)
2014-04-27 9:16 ` flock() and NFS [Was: Re: [PATCH] locks: rename file-private locks to file-description locks] Michael Kerrisk (man-pages)
[not found] ` <535CCAD2.4060304-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-04-27 10:04 ` NeilBrown
[not found] ` <20140427200431.426c98d1-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-04-27 11:11 ` Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkgv5NqDRUNu0XtSABqmctd7=rpMMEYhhDQNzPssZuU5bA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-27 21:28 ` NeilBrown
2014-04-29 9:07 ` Michael Kerrisk (man-pages)
2014-04-29 9:24 ` NeilBrown
[not found] ` <20140429192458.641ebf1d-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-04-29 9:53 ` Michael Kerrisk (man-pages)
[not found] ` <535F76A4.4090208-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-04-29 11:34 ` Jeff Layton
2014-04-29 12:20 ` Michael Kerrisk (man-pages)
2014-04-28 10:23 ` [PATCH] locks: rename file-private locks to file-description locks Jeff Layton
2014-04-28 10:46 ` NeilBrown
2014-04-21 18:48 ` Theodore Ts'o
2014-04-21 18:51 ` Rich Felker
2014-04-21 19:04 ` Theodore Ts'o
2014-04-21 19:06 ` Christoph Hellwig
2014-04-21 20:10 ` Michael Kerrisk (man-pages)
2014-04-21 20:20 ` Rich Felker
2014-04-21 14:25 ` Michael Kerrisk (man-pages)
2014-04-21 16:05 ` Stefan (metze) Metzmacher
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=535573E0.9080106@gmail.com \
--to=mtk.manpages@gmail.com \
--cc=carlos@redhat.com \
--cc=dalias@libc.org \
--cc=hch@infradead.org \
--cc=jlayton@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=metze@samba.org \
--cc=nfs-ganesha-devel@lists.sourceforge.net \
--cc=samba-technical@lists.samba.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).