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

David Teigland teigland at redhat.com
Thu Jan 22 19:03:45 UTC 2009


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




More information about the Cluster-devel mailing list