Date: Sun, 9 Apr 2017 21:50:21 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316667 - head/sys/fs/nfsclient Message-ID: <201704092150.v39LoLw3056728@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Sun Apr 9 21:50:21 2017 New Revision: 316667 URL: https://svnweb.freebsd.org/changeset/base/316667 Log: Fix the NFSv4 client hndling of a stale write verifier in the Commit operation. When the NFSv4 client Commit operation encountered a stale write verifier, it erroneously mapped that to EIO. This could have caused recently written data to be lost when a server crashes/reboots between an UNSTABLE write and the subsequent commit. This patch fixes this. The bug was only for the NFSv4 client and did not affect NFSv3. Tested by: cperciva PR: 215887 MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clport.c Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Sun Apr 9 21:06:21 2017 (r316666) +++ head/sys/fs/nfsclient/nfs_clport.c Sun Apr 9 21:50:21 2017 (r316667) @@ -1196,7 +1196,7 @@ nfscl_maperr(struct thread *td, int erro { struct proc *p; - if (error < 10000) + if (error < 10000 || error >= NFSERR_STALEWRITEVERF) return (error); if (td != NULL) p = td->td_proc;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704092150.v39LoLw3056728>