From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932132AbaIELsc (ORCPT ); Fri, 5 Sep 2014 07:48:32 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:37414 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932068AbaIELsa (ORCPT ); Fri, 5 Sep 2014 07:48:30 -0400 From: Jeff Layton X-Google-Original-From: Jeff Layton Date: Fri, 5 Sep 2014 07:48:27 -0400 To: Christoph Hellwig Cc: Trond Myklebust , Jeff Layton , Devel FS Linux , Linux NFS Mailing List , "J. Bruce Fields" , Linux Kernel mailing list , Steven Whitehouse , cluster-devel , samba-technical@lists.samba.org Subject: Re: [PATCH v2 01/17] locks: consolidate "nolease" routines Message-ID: <20140905074827.62a5048a@tlielax.poochiereds.net> In-Reply-To: <20140904201200.GA26054@infradead.org> References: <1409834323-7171-1-git-send-email-jlayton@primarydata.com> <1409834323-7171-2-git-send-email-jlayton@primarydata.com> <20140904084938.2664bf0a@tlielax.poochiereds.net> <20140904201200.GA26054@infradead.org> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.22; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Sep 2014 13:12:00 -0700 Christoph Hellwig wrote: > On Thu, Sep 04, 2014 at 02:25:35PM -0400, Trond Myklebust wrote: > > Actually, it looks as if when you compile with !CONFIG_FILE_LOCKING, > > then fcntl_setlease() returns the value '0' (which would be > > "success!"). The word "confusing" only begins to describe it all. > > That's incorrect for sure, we should agree on a single sensible code > for: > > 1) !CONFIG_FILE_LOCKING > 2) !lease_enable > 3) filesystem doesn't support leases. > Agreed. I think -ENOLCK is really better than -EINVAL. I usually take -EINVAL to mean "you sent me something bogus". Whereas -ENOLCK just says "locking doesn't work". -ENOLCK seems closer to the situation in all 3 cases above. That said, this is a user-visible change. The main userland consumer of leases (AFAIK) is samba, so I'll take a peek at that code and run it by them before merging anything. -- Jeff Layton From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Layton Subject: Re: [PATCH v2 01/17] locks: consolidate "nolease" routines Date: Fri, 5 Sep 2014 07:48:27 -0400 Message-ID: <20140905074827.62a5048a@tlielax.poochiereds.net> References: <1409834323-7171-1-git-send-email-jlayton@primarydata.com> <1409834323-7171-2-git-send-email-jlayton@primarydata.com> <20140904084938.2664bf0a@tlielax.poochiereds.net> <20140904201200.GA26054@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Trond Myklebust , Jeff Layton , Devel FS Linux , Linux NFS Mailing List , "J. Bruce Fields" , Linux Kernel mailing list , Steven Whitehouse , cluster-devel , samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org To: Christoph Hellwig Return-path: In-Reply-To: <20140904201200.GA26054-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 4 Sep 2014 13:12:00 -0700 Christoph Hellwig wrote: > On Thu, Sep 04, 2014 at 02:25:35PM -0400, Trond Myklebust wrote: > > Actually, it looks as if when you compile with !CONFIG_FILE_LOCKING, > > then fcntl_setlease() returns the value '0' (which would be > > "success!"). The word "confusing" only begins to describe it all. > > That's incorrect for sure, we should agree on a single sensible code > for: > > 1) !CONFIG_FILE_LOCKING > 2) !lease_enable > 3) filesystem doesn't support leases. > Agreed. I think -ENOLCK is really better than -EINVAL. I usually take -EINVAL to mean "you sent me something bogus". Whereas -ENOLCK just says "locking doesn't work". -ENOLCK seems closer to the situation in all 3 cases above. That said, this is a user-visible change. The main userland consumer of leases (AFAIK) is samba, so I'll take a peek at that code and run it by them before merging anything. -- Jeff Layton -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Layton Date: Fri, 5 Sep 2014 07:48:27 -0400 Subject: [Cluster-devel] [PATCH v2 01/17] locks: consolidate "nolease" routines In-Reply-To: <20140904201200.GA26054@infradead.org> References: <1409834323-7171-1-git-send-email-jlayton@primarydata.com> <1409834323-7171-2-git-send-email-jlayton@primarydata.com> <20140904084938.2664bf0a@tlielax.poochiereds.net> <20140904201200.GA26054@infradead.org> Message-ID: <20140905074827.62a5048a@tlielax.poochiereds.net> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Thu, 4 Sep 2014 13:12:00 -0700 Christoph Hellwig wrote: > On Thu, Sep 04, 2014 at 02:25:35PM -0400, Trond Myklebust wrote: > > Actually, it looks as if when you compile with !CONFIG_FILE_LOCKING, > > then fcntl_setlease() returns the value '0' (which would be > > "success!"). The word "confusing" only begins to describe it all. > > That's incorrect for sure, we should agree on a single sensible code > for: > > 1) !CONFIG_FILE_LOCKING > 2) !lease_enable > 3) filesystem doesn't support leases. > Agreed. I think -ENOLCK is really better than -EINVAL. I usually take -EINVAL to mean "you sent me something bogus". Whereas -ENOLCK just says "locking doesn't work". -ENOLCK seems closer to the situation in all 3 cases above. That said, this is a user-visible change. The main userland consumer of leases (AFAIK) is samba, so I'll take a peek at that code and run it by them before merging anything. -- Jeff Layton