Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f563b89b authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFS: Don't reset pg_moreio in __nfs_pageio_add_request



Once we've started sending unstable NFS writes, we do not want to
clear pg_moreio, or we may end up sending the very last request as
a stable write if the commit lists are still empty.

Do, however, reset pg_moreio in the case where we end up having to
recoalesce the write if an attempt to use pNFS failed.

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent aafe3750
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -935,7 +935,6 @@ static int __nfs_pageio_add_request(struct nfs_pageio_descriptor *desc,
			nfs_pageio_doio(desc);
			if (desc->pg_error < 0)
				return 0;
			desc->pg_moreio = 0;
			if (desc->pg_recoalesce)
				return 0;
			/* retry add_request for this subreq */
@@ -982,6 +981,7 @@ static int nfs_do_recoalesce(struct nfs_pageio_descriptor *desc)
		desc->pg_count = 0;
		desc->pg_base = 0;
		desc->pg_recoalesce = 0;
		desc->pg_moreio = 0;

		while (!list_empty(&head)) {
			struct nfs_page *req;