Date: Tue, 19 Feb 2019 12:45:37 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344277 - head/sys/fs/nfsclient Message-ID: <201902191245.x1JCjbYc035486@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Tue Feb 19 12:45:37 2019 New Revision: 344277 URL: https://svnweb.freebsd.org/changeset/base/344277 Log: Work around the "nfscl: bad open cnt on server" assertion that can happen when rerooting into NFSv4 rootfs with kernel built with INVARIANTS. I've talked to rmacklem@ (back in 2017), and while the root cause is still unknown, the case guarded by assertion (nfscl_doclose() being called from VOP_INACTIVE) is believed to be safe, and the whole thing seems to run just fine. Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Tue Feb 19 11:07:02 2019 (r344276) +++ head/sys/fs/nfsclient/nfs_clstate.c Tue Feb 19 12:45:37 2019 (r344277) @@ -3188,8 +3188,11 @@ lookformore: !NFSBCMP(op->nfso_fh, nfhp->nfh_fh, nfhp->nfh_len)) { /* Found an open, close it. */ +#ifdef DIAGNOSTIC KASSERT((op->nfso_opencnt == 0), - ("nfscl: bad open cnt on server")); + ("nfscl: bad open cnt on server (%d)", + op->nfso_opencnt)); +#endif NFSUNLOCKCLSTATE(); nfsrpc_doclose(VFSTONFS(vnode_mount(vp)), op, p);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902191245.x1JCjbYc035486>