Home
last modified time | relevance | path

Searched hist:"0 b67130149b006628389ff3e8f46be9957af98aa" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/fs/nfs/
H A Dread.cdiff 0b67130149b006628389ff3e8f46be9957af98aa Tue Nov 14 15:12:23 CST 2006 Trond Myklebust <Trond.Myklebust@netapp.com> NFS: Fix asynchronous read error handling

We must always call ->read_done() before we truncate the page data, or
decide to flag an error. The reasons are that
in NFSv2, ->read_done() is where the eof flag gets set.
in NFSv3/v4 ->read_done() handles EJUKEBOX-type errors, and
v4 state recovery.

However, we need to mark the pages as uptodate before we deal with short
read errors, since we may need to modify the nfs_read_data arguments.

We therefore split the current nfs_readpage_result() into two parts:
nfs_readpage_result(), which calls ->read_done() etc, and
nfs_readpage_retry(), which subsequently handles short reads.

Note: Removing the code that retries in case of a short read also fixes a
bug in nfs_direct_read_result(), which used to return a corrupted number of
bytes.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>