Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

NFS: improve "Server wrote zero bytes" error

When a pnfs error occurs, the IO is retried against the MDS. However,
the initial IO leads to the kernel logging "Serer wrote zero bytes"
when in fact the MDS IO will not fail and thus the error misleads
administrators that the system is experiencing issues.

When pnfs IO fails which triggers pnfs_write_done_resent_to_mds() which
would end up clearing nfs_pgio_header's pages structure (copying the
content into a new one to do new RPC calls to the MDS). Thus,
in nfs_writeback_result() when we have no pages to work with no need
to try and also therefore skip logging the message about 0bytes.

Fixes: 6c75dc0d498c ("NFS: merge _full and _partial write rpc_ops")
Suggested-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>

authored by

Olga Kornievskaia and committed by
Trond Myklebust
3a06bac5 1805e6b2

+1 -1
+1 -1
fs/nfs/write.c
··· 1551 1551 struct nfs_pgio_args *argp = &hdr->args; 1552 1552 struct nfs_pgio_res *resp = &hdr->res; 1553 1553 1554 - if (resp->count < argp->count) { 1554 + if (resp->count < argp->count && !list_empty(&hdr->pages)) { 1555 1555 static unsigned long complain; 1556 1556 1557 1557 /* This a short write! */