From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Lutomirski Subject: Re: [PATCH v5 14/14] locks: add new fcntl cmd values for handling file private locks Date: Thu, 09 Jan 2014 12:29:04 -0800 Message-ID: <52CF0690.5030006@amacapital.net> References: <1389277187-18211-1-git-send-email-jlayton@redhat.com> <1389277187-18211-15-git-send-email-jlayton@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: nfs-ganesha-devel@lists.sourceforge.net, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org To: Jeff Layton , linux-fsdevel@vger.kernel.org Return-path: Received: from mail-pd0-f172.google.com ([209.85.192.172]:52949 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755917AbaAIU3G (ORCPT ); Thu, 9 Jan 2014 15:29:06 -0500 Received: by mail-pd0-f172.google.com with SMTP id g10so3622737pdj.31 for ; Thu, 09 Jan 2014 12:29:06 -0800 (PST) In-Reply-To: <1389277187-18211-15-git-send-email-jlayton@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 01/09/2014 06:19 AM, Jeff Layton wrote: > Due to some unfortunate history, POSIX locks have very strange and > unhelpful semantics. The thing that usually catches people by surprise > is that they are dropped whenever the process closes any file descriptor > associated with the inode. > [...] > +#define F_GETLKP 36 > +#define F_SETLKP 37 > +#define F_SETLKPW 38 > + > +#ifndef CONFIG_64BIT > +#ifndef F_GETLK64 > +#define F_GETLKP64 39 > +#define F_SETLKP64 40 > +#define F_SETLKPW64 41 > +#endif > +#endif > + Since there are no existing callers of these fcntls, can you get rid of the non-64-bit variants? The implementation might be a bit more of departure from current code, but it should make everything a lot cleaner and make it easier (aka automatic) for new architectures to support this feature. --Andy