FreeBSD/sys/fs/nfsclient/nfs_clsubs.c
/*
 * The write verifier has changed (probably due to a server reboot), so all
 * B_NEEDCOMMIT blocks will have to be written again. Since they are on the
 * dirty block list as B_DELWRI, all this takes is clearing the B_NEEDCOMMIT
 * and B_CLUSTEROK flags.  Once done the new write verifier can be set for the
 * mount point.
 *
 * B_CLUSTEROK must be cleared along with B_NEEDCOMMIT because stage 1 data
 * writes are not clusterable.
 */
The write verifier has changed (probably due to a server reboot), so all
B_NEEDCOMMIT blocks will have to be written again. Since they are on the
dirty block list as B_DELWRI, all this takes is clearing the B_NEEDCOMMIT
and B_CLUSTEROK flags.  Once done the new write verifier can be set for the
mount point.

B_CLUSTEROK must be cleared along with B_NEEDCOMMIT because stage 1 data
writes are not clusterable.
The write verifier has changed ( probably due to a server reboot ) so all B_NEEDCOMMIT blocks will have to be written again . Since they are on the dirty block list as B_DELWRI all this takes is clearing the B_NEEDCOMMIT and B_CLUSTEROK flags . Once done the new write verifier can be set for the mount point . B_CLUSTEROK must be cleared along with B_NEEDCOMMIT because stage 1 data writes are not clusterable .
void
ncl_clearcommit(struct mount *mp)
{
	struct vnode *vp, *nvp;
	struct buf *bp, *nbp;
	struct bufobj *bo;
	MNT_VNODE_FOREACH_ALL(vp, mp, nvp) {
		bo = &vp->v_bufobj;
		vholdl(vp);
		VI_UNLOCK(vp);
		BO_LOCK(bo);
		TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) {
			if (!BUF_ISLOCKED(bp) &&
			    (bp->b_flags & (B_DELWRI | B_NEEDCOMMIT))
				== (B_DELWRI | B_NEEDCOMMIT))
				bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK);
		}
		BO_UNLOCK(bo);
		vdrop(vp);
	}
}
void ncl_clearcommit ( struct mount * mp ) { struct vnode * vp , * nvp ; struct buf * bp , * nbp ; struct bufobj * bo ; MNT_VNODE_FOREACH_ALL ( vp , mp , nvp ) { bo = & vp -> v_bufobj ; vholdl ( vp ) ; VI_UNLOCK ( vp ) ; BO_LOCK ( bo ) ; TAILQ_FOREACH_SAFE ( bp , & bo -> bo_dirty . bv_hd , b_bobufs , nbp ) { if ( ! BUF_ISLOCKED ( bp ) && ( bp -> b_flags & ( B_DELWRI | B_NEEDCOMMIT ) ) == ( B_DELWRI | B_NEEDCOMMIT ) ) bp -> b_flags &= ~ ( B_NEEDCOMMIT | B_CLUSTEROK ) ; } BO_UNLOCK ( bo ) ; vdrop ( vp ) ; } }
The write verifier has changed (probably due to a server reboot), so all
 B_NEEDCOMMIT blocks will have to be written again.
The write verifier has changed ( probably due to a server reboot ) so all B_NEEDCOMMIT blocks will have to be written again .