NFS: Fix error handling for O_DIRECT write scheduling
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 4 Sep 2023 16:34:37 +0000 (12:34 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 11 Sep 2023 15:29:38 +0000 (11:29 -0400)
commit954998b60caa8f2a3bf3abe490de6f08d283687a
tree75b682660e7cb137ea079bf7a3dbf8a89e7bf667
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d
NFS: Fix error handling for O_DIRECT write scheduling

If we fail to schedule a request for transmission, there are 2
possibilities:
1) Either we hit a fatal error, and we just want to drop the remaining
   requests on the floor.
2) We were asked to try again, in which case we should allow the
   outstanding RPC calls to complete, so that we can recoalesce requests
   and try again.

Fixes: d600ad1f2bdb ("NFS41: pop some layoutget errors to application")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/direct.c