question about old flock() on nfsv4 commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Trond.

I'm looking at a flock() on nfsv4 problem, where I'm not seeing unlock
requests go out in some cases (mostly when a filp is inherited across
fork() and the last close is done by a different process than the
opener.

I have a question about this commit:

-------------------------

commit 77041ed9b49a9e10f374bfa6e482d30ee7a3d46e
Author: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
Date:   Thu Jul 1 12:49:11 2010 -0400

    NFSv4: Ensure the lockowners are labelled using the fl_owner and/or fl_pid
    
    flock locks want to be labelled using the process pid, while posix locks
    want to be labelled using the fl_owner.
    
    Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>

-------------------------

I don't get it...why does the pid have any relevance here? Shouldn't
these locks be associated with the struct file? If so, then that's
already accounted for in the fl_owner_t when it comes down from the vfs.

It seems like we ought to let the vfs manage who owns the lock and just
treat that owner opaquely in the NFS code. Am I missing something?

Thanks,
-- 
Jeff Layton <jlayton@xxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux