• J. Bruce Fields's avatar
    nfsd: create a separate lease for each delegation · 353601e7
    J. Bruce Fields authored
    Currently we only take one vfs-level delegation (lease) for each file,
    no matter how many clients hold delegations on that file.
    
    Let's instead keep a one-to-one mapping between NFSv4 delegations and
    VFS delegations.  This turns out to be simpler.
    
    There is still a many-to-one mapping of NFS opens to NFS files, and the
    delegations on one file are all associated with one struct file.  The
    VFS can still distinguish between these delegations since we're setting
    fl_owner to the struct nfs4_delegation now, not to the shared file.
    
    I'm replacing at least one complicated function wholesale, which I don't
    like to do, but I haven't figured out how to do this more incrementally.
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
    353601e7
nfs4state.c 187 KB