• Weston Andros Adamson's avatar
    nfs: handle multiple reqs in nfs_page_async_flush · d4581383
    Weston Andros Adamson authored
    Change nfs_find_and_lock_request so nfs_page_async_flush can handle multiple
    requests in a page. There is only one request for a page the first time
    nfs_page_async_flush is called, but if a write or commit fails, async_flush
    is called again and there may be multiple requests associated with the page.
    The solution is to merge all the requests in a page group into a single
    request before calling nfs_pageio_add_request.
    
    Rename nfs_find_and_lock_request to nfs_lock_and_join_requests and
    change it to first lock all requests for the page, then cancel and merge
    all subrequests into the head request.
    Signed-off-by: default avatarWeston Andros Adamson <dros@primarydata.com>
    Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
    d4581383
write.c 50.9 KB