• Trond Myklebust's avatar
    pNFS: Don't forget the layout stateid if there are outstanding LAYOUTGETs · 334a8f37
    Trond Myklebust authored
    If there are outstanding LAYOUTGET rpc calls, then we want to ensure that
    we keep the layout stateid around so we that don't inadvertently pick up
    an old/misordered sequence id.
    The race is as follows:
    
    Client				Server
    ======				======
    LAYOUTGET(seqid)
    LAYOUTGET(seqid)
    				return LAYOUTGET(seqid+1)
    				return LAYOUTGET(seqid+2)
    process LAYOUTGET(seqid+2)
    	forget layout
    process LAYOUTGET(seqid+1)
    
    If it forgets the layout stateid before processing seqid+1, then
    the client will not check the layout->plh_barrier, and so will set
    the stateid with seqid+1.
    Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
    334a8f37
pnfs.c 67.1 KB