[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140905074827.62a5048a@tlielax.poochiereds.net>
Date: Fri, 5 Sep 2014 07:48:27 -0400
From: Jeff Layton <jeff.layton@...marydata.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: Trond Myklebust <trond.myklebust@...marydata.com>,
Jeff Layton <jeff.layton@...marydata.com>,
Devel FS Linux <linux-fsdevel@...r.kernel.org>,
Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
"J. Bruce Fields" <bfields@...ldses.org>,
Linux Kernel mailing list <linux-kernel@...r.kernel.org>,
Steven Whitehouse <swhiteho@...hat.com>,
cluster-devel <cluster-devel@...hat.com>,
samba-technical@...ts.samba.org
Subject: Re: [PATCH v2 01/17] locks: consolidate "nolease" routines
On Thu, 4 Sep 2014 13:12:00 -0700
Christoph Hellwig <hch@...radead.org> 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 <jlayton@...marydata.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists