• Trond Myklebust's avatar
    NFS: Default change_attr_type to NFS4_CHANGE_TYPE_IS_UNDEFINED · eea41330
    Trond Myklebust authored
    Both NFSv3 and NFSv2 generate their change attribute from the ctime
    value that was supplied by the server. However the problem is that there
    are plenty of servers out there with ctime resolutions of 1ms or worse.
    In a modern performance system, this is insufficient when trying to
    decide which is the most recent set of attributes when, for instance, a
    READ or GETATTR call races with a WRITE or SETATTR.
    
    For this reason, let's revert to labelling the NFSv2/v3 change
    attributes as NFS4_CHANGE_TYPE_IS_UNDEFINED. This will ensure we protect
    against such races.
    
    Fixes: 7b24dacf ("NFS: Another inode revalidation improvement")
    Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
    Tested-by: default avatarChuck Lever <chuck.lever@oracle.com>
    eea41330
proc.c 19.4 KB