This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] locks: rename file-private locks to file-description locks
- From: Christoph Hellwig <hch at infradead dot org>
- To: "Michael Kerrisk (man-pages)" <mtk dot manpages at gmail dot com>
- Cc: Rich Felker <dalias at libc dot org>, Jeff Layton <jlayton at redhat dot com>, linux-fsdevel at vger dot kernel dot org, linux-kernel at vger dot kernel dot org, samba-technical at lists dot samba dot org, Ganesha NFS List <nfs-ganesha-devel at lists dot sourceforge dot net>, Carlos O'Donell <carlos at redhat dot com>, libc-alpha <libc-alpha at sourceware dot org>, "Stefan (metze) Metzmacher" <metze at samba dot org>
- Date: Mon, 21 Apr 2014 09:09:27 -0700
- Subject: Re: [PATCH] locks: rename file-private locks to file-description locks
- Authentication-results: sourceware.org; auth=none
- References: <1398087935-14001-1-git-send-email-jlayton at redhat dot com> <20140421140246 dot GB26358 at brightrain dot aerifal dot cx> <535529FA dot 8070709 at gmail dot com>
On Mon, Apr 21, 2014 at 04:23:54PM +0200, Michael Kerrisk (man-pages) wrote:
>
> There's at least two problems to solve here:
>
> 1) "File private locks" is _meaningless_ as a term. Elsewhere
> (http://thread.gmane.org/gmane.network.samba.internals/76414/focus=1685376),
It's indeed not a very good choice, but the new name is even worse.
Just call them non-broken locks? :) Or not give them a name an just
append a 2 to the fcntls? :)
> 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 don't think so. They also should have a name very similar because
they have the same semantics with a major bug fixed. In fact I can't
think of anyone who would actually want the old behavior.