• Trond Myklebust's avatar
    pNFS: Avoid a live lock condition in pnfs_update_layout() · 880265c7
    Trond Myklebust authored
    If we're about to send the first layoutget for an empty layout, we want
    to make sure that we drain out the existing pending layoutget calls
    first. The reason is that these layouts may have been already implicitly
    returned to the server by a recall to which the client gave a
    NFS4ERR_NOMATCHING_LAYOUT response.
    
    The problem is that wait_var_event_killable() could in principle see the
    plh_outstanding count go back to '1' when the first process to wake up
    starts sending a new layoutget. If it fails to get a layout, then this
    loop can continue ad infinitum...
    
    Fixes: 0b77f97a ("NFSv4/pnfs: Fix layoutget behaviour after invalidation")
    Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    880265c7
pnfs.h 27.5 KB