Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Feb 2009 14:07:32 -0500 (EST)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        admin@kedvenc.hu
Cc:        freebsd-fs@freebsd.org
Subject:   Re: nfs delay causing broken files
Message-ID:  <Pine.GSO.4.63.0902061403440.27692@muncher.cs.uoguelph.ca>

next in thread | raw e-mail | index | archive | help
Well, maybe not SOL if you are willing to hack the kernel sources. If you
change the following line in sys/nfsclient/nfs_bio.c as follows:
 	if (nfs_directio_enable && (ioflag & IO_DIRECT) && vp->v_type == VREG)
 		return nfs_directio_write(vp, uio, cred, ioflag);
to
 	if (nfs_directio_enable && vp->v_type == VREG)
 		return nfs_directio_write(vp, uio, cred, ioflag);

then all writes would be pushed to the server if nfs_directio_enable is
set non-zero by sysctl. (In other words, O_DIRECT would be set for all
opens on the NFS mounts.)

Ugly, but if it fixes your problem...rick
ps: I'm thinking that a mount option that does this might be useful?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.63.0902061403440.27692>