Re: [Cluster-devel] Re: [PATCH 1/2] dlm: initialize file_lock struct in GETLK before copying conflicting lock

David Teigland
2009-01-22T19:04:17Z

On Thu, Jan 22, 2009 at 01:37:33PM -0500, Jeff Layton wrote:
> > using locks_init_lock() plus the existing assignments. But, I think the
> > best solution may be for dlm_posix_get() to set up a new lightweight
> > file_lock with the values we need, and then call __locks_copy_lock() with
> > it, just like posix_test_lock().
>
> Why would we want to make another lock here? Is that just to make sure that
> if new fields are added later that we deal with them appropriately?

Just so we could use the __locks_copy_lock() function to make the assignments
for us. Setting up the fake file_lock just for that purpose might not be
worth it, though, so I'm happy to stick with the current patch.

Dave