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: Rich Felker <dalias at libc dot org>
- To: Jeff Layton <jlayton at redhat dot com>
- Cc: "Michael Kerrisk (man-pages)" <mtk dot manpages at gmail 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>, Christoph Hellwig <hch at infradead dot org>
- Date: Mon, 21 Apr 2014 16:22:19 -0400
- 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> <20140421161004 dot GC26358 at brightrain dot aerifal dot cx> <20140421124508 dot 4f2c9ca7 at tlielax dot poochiereds dot net> <5355610A dot 6090606 at gmail dot com> <20140421143238 dot 668c818d at tlielax dot poochiereds dot net> <20140421184829 dot GE26358 at brightrain dot aerifal dot cx> <20140421151629 dot 009cdd66 at ipyr dot poochiereds dot net>
On Mon, Apr 21, 2014 at 03:16:29PM -0400, Jeff Layton wrote:
> On Mon, 21 Apr 2014 14:48:29 -0400
> Rich Felker <dalias@libc.org> wrote:
>
> > On Mon, Apr 21, 2014 at 02:32:38PM -0400, Jeff Layton wrote:
> > > > > Fair enough. Assuming we kept "file-description locks" as a name, what
> > > > > would you propose as new macro names?
> > > >
> > > > I assume you meant, "assume we kept the term 'file-private locks'..."
> > > > In that case, at least make the constants something like
> > > >
> > > > F_FP_SETLK
> > > > F_FP_SETLKW
> > > > F_FP_GETLK
> > > >
> > > > so that they are not confused with the traditional constants.
> > > >
> > > > Cheer,
> > > >
> > >
> > > Actually no, I was asking how Rich would name the constants if we use
> > > the name "file-description locks" (as per the patch I posted this
> > > morning), since his objection was the use if *_FD_* names.
> > >
> > > I would assume that if we stick with "file-private locks" as the name,
> > > then we'll still change the constants to a form like *_FP_*.
> > >
> > > Also, to be clear...Frank is correct that the name "file-private" came
> > > from allowing the locks to be "private" to a particular open file
> > > description. Though I agree that it's a crappy name at best...
> >
> > As I mentioned in a reply to Michael just now, I think FP is bad
> > because the whole problem is that legacy fcntl locks are associated
> > with the underlying file rather than the open file description (open
> > instance). So open-private (OP) might be a better choice than
> > file-private.
>
> Is "open-private" or "open-file-private" really any better than
> "file-private" ? They're all names that only a mother could love and
> I'm not sure any of them are really any clearer than the others. Also:
Yes, much better. File-private expresses the current broken semantics
of fcntl locks: being associated with files. The whole point of the
new locks is NOT to be associated with files but with open file
descriptions.
Rich