• NeilBrown's avatar
    NFSv4: use exponential retry on NFS4ERR_DELAY for async requests. · 8478eaa1
    NeilBrown authored
    Currently asynchronous NFSv4 request will be retried with
    exponential timeout (from 1/10 to 15 seconds), but async
    requests will always use a 15second retry.
    
    Some "async" requests are really synchronous though.  The
    async mechanism is used to allow the request to continue if
    the requesting process is killed.
    In those cases, an exponential retry is appropriate.
    
    For example, if two different clients both open a file and
    get a READ delegation, and one client then unlinks the file
    (while still holding an open file descriptor), that unlink
    will used the "silly-rename" handling which is async.
    The first rename will result in NFS4ERR_DELAY while the
    delegation is reclaimed from the other client.  The rename
    will not be retried for 15 seconds, causing an unlink to take
    15 seconds rather than 100msec.
    
    This patch only added exponential timeout for async unlink and
    async rename.  Other async calls, such as 'close' are sometimes
    waited for so they might benefit from exponential timeout too.
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
    8478eaa1
nfs4proc.c 229 KB