Skip to contentSkip to conversation

nfsd: only WARN once on unmapped errors

PATCH New J. Bruce Fields 1 participant 2 messages Oct 7, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 nfsd: only WARN once on unmapped errors

From: "J. Bruce Fields" <[email protected]>

No need to spam the logs here.

The only drawback is losing information if we ever encounter two different unmapped errors, but in practice we've rarely see even one.

---
 fs/nfsd/nfsproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfsproc.c +1 -1
index e9214768cde9..a56ee10204d9 100644
@@ -798,7 +798,7 @@ nfserrno (int errno)
 		if (nfs_errtbl[i].syserr == errno)
 			return nfs_errtbl[i].nfserr;
 	}
-	WARN(1, "nfsd: non-standard errno: %d\n", errno);
+	WARN_ONCE(1, "nfsd: non-standard errno: %d\n", errno);
 	return nfserr_io;
 }
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 nfsd: handle EUCLEAN

From: "J. Bruce Fields" <[email protected]>

Eric Sandeen reports that xfs can return this if filesystem corruption prevented completing the operation.

---
 fs/nfsd/nfsproc.c | 1 +
 1 file changed, 1 insertion(+)
fs/nfsd/nfsproc.c +1 -0
index a56ee10204d9..78cd77042a25 100644
@@ -791,6 +791,7 @@ nfserrno (int errno)
 		{ nfserr_toosmall, -ETOOSMALL },
 		{ nfserr_serverfault, -ESERVERFAULT },
 		{ nfserr_serverfault, -ENFILE },
+		{ nfserr_io, -EUCLEAN },
 	};
 	int	i;
 
Signature · 1 line
2.7.4