On Thu, 18 Jan 2024, Chuck Lever wrote: > On Tue, Jan 16, 2024 at 02:45:56PM -0500, Jeff Layton wrote: > > Long ago, file locks used to hang off of a singly-linked list in struct > > inode. Because of this, when leases were added, they were added to the > > same list and so they had to be tracked using the same sort of > > structure. > > > > Several years ago, we added struct file_lock_context, which allowed us > > to use separate lists to track different types of file locks. Given > > that, leases no longer need to be tracked using struct file_lock. > > > > That said, a lot of the underlying infrastructure _is_ the same between > > file leases and locks, so we can't completely separate everything. > > Naive question: locks and leases are similar. Why do they need to be > split apart? The cover letter doesn't address that, and I'm new > enough at this that I don't have that context. For me, the big win was in the last patch where we got separate lock_manager_operations and lease_manager_operations. There is zero overlap between the two. This highlights that one one level these are different things with different behaviours. NeilBrown