Date: Fri, 6 Jul 2018 19:18:45 +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: r336041 - head/sys/fs/nfsserver Message-ID: <201807061918.w66JIja8065738@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Fri Jul 6 19:18:45 2018 New Revision: 336041 URL: https://svnweb.freebsd.org/changeset/base/336041 Log: Change the pNFS server so that it does not disable a mirrored DS for an NFSERR_STALE error reported via a LayoutReturn. The current FreeBSD client can generate these errors for an operational DS while doing a recovery of a mirror after a mirrored DS has been repaired. I am not sure why these errors occur, but my best current guess is a race between the Layout Recall issued by the kernel code run from pnfsdscopymr(8) and a Read operation on the DS for the file bing copied. The errors are not fatal, since the client falls back on doing I/O through the MDS, which can do the I/O successfully as a proxy. (The fact that the MDS can do this indicates that the file does still exist on the functioning DS.) This change only affects the pNFS server and only when a client does a LayoutReturn with the NFSERR_STALE error report. Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Jul 6 19:10:11 2018 (r336040) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Jul 6 19:18:45 2018 (r336041) @@ -6750,9 +6750,10 @@ nfsrv_flexlayouterr(struct nfsrv_descript *nd, uint32_ NFSD_DEBUG(4, "flexlayouterr op=%d stat=%d\n", opnum, stat); /* - * Except for NFSERR_ACCES errors, disable the mirror. + * Except for NFSERR_ACCES and NFSERR_STALE errors, + * disable the mirror. */ - if (stat != NFSERR_ACCES) + if (stat != NFSERR_ACCES && stat != NFSERR_STALE) nfsrv_delds(devid, p); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807061918.w66JIja8065738>