linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/8] NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup
@ 2019-08-17 21:22 Trond Myklebust
  2019-08-17 21:22 ` [PATCH 2/8] NFS: On fatal writeback errors, we need to call nfs_inode_remove_request() Trond Myklebust
  0 siblings, 1 reply; 8+ messages in thread
From: Trond Myklebust @ 2019-08-17 21:22 UTC (permalink / raw)
  To: linux-nfs

Initialise the result count to 0 rather than initialising it to the
argument count. The reason is that we want to ensure we record the
I/O stats correctly in the case where an error is returned (for
instance in the layoutstats).

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 fs/nfs/pagelist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 56cefa0ab804..20b3717cd7ca 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -590,7 +590,7 @@ static void nfs_pgio_rpcsetup(struct nfs_pgio_header *hdr,
 	}
 
 	hdr->res.fattr   = &hdr->fattr;
-	hdr->res.count   = count;
+	hdr->res.count   = 0;
 	hdr->res.eof     = 0;
 	hdr->res.verf    = &hdr->verf;
 	nfs_fattr_init(&hdr->fattr);
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-08-17 21:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-17 21:22 [PATCH 1/8] NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup Trond Myklebust
2019-08-17 21:22 ` [PATCH 2/8] NFS: On fatal writeback errors, we need to call nfs_inode_remove_request() Trond Myklebust
2019-08-17 21:22   ` [PATCH 3/8] NFS: Fix spurious EIO read errors Trond Myklebust
2019-08-17 21:22     ` [PATCH 4/8] SUNRPC: Don't handle errors if the bind/connect succeeded Trond Myklebust
2019-08-17 21:22       ` [PATCH 5/8] pNFS/flexfiles: Turn off soft RPC calls Trond Myklebust
2019-08-17 21:22         ` [PATCH 6/8] SUNRPC: Handle EADDRINUSE and ENOBUFS correctly Trond Myklebust
2019-08-17 21:22           ` [PATCH 7/8] Revert "NFSv4/flexfiles: Abort I/O early if the layout segment was invalidated" Trond Myklebust
2019-08-17 21:22             ` [PATCH 8/8] SUNRPC: Handle connection breakages correctly in call_status() Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).