Re: [RFC PATCH v2 02/19] fs/locks: Add Exclusive flag to user Layout lease
From: John Hubbard
Date: Wed Sep 04 2019 - 19:12:39 EST
On 8/9/19 3:58 PM, ira.weiny@xxxxxxxxx wrote:
> From: Ira Weiny <ira.weiny@xxxxxxxxx>
> Add an exclusive lease flag which indicates that the layout mechanism
> can not be broken.
After studying the rest of these discussions extensively, I think in all
cases FL_EXCLUSIVE is better named "unbreakable", rather than exclusive.
If you read your sentence above, it basically reinforces that idea: "add an
exclusive flag to mean it is unbreakable" is a bit of a disconnect. It
would be better to say,
Add an "unbreakable" lease flag which indicates that the layout lease
cannot be broken.
Furthermore, while this may or may not be a way forward on the "we cannot
have more than one process take a layout lease on a file/range", it at
least stops making it impossible. In other words, no one is going to
write a patch that allows sharing an exclusive layout lease--but someone
might well update some of these patches here to make it possible to
have multiple processes take unbreakable leases on the same file/range.
I haven't worked through everything there yet, but again:
* FL_UNBREAKABLE is the name you're looking for here, and
* I think we want to allow multiple processes to take FL_UNBREAKABLE
leases on the same file/range, so that we can make RDMA setups
reasonable. By "reasonable" I mean, "no need to have a lead process
that owns all the leases".