Date: Fri, 06 Feb 2009 20:37:45 +0100 From: Joe7 <admin@kedvenc.hu> To: Rick Macklem <rmacklem@uoguelph.ca> Cc: freebsd-fs@freebsd.org Subject: Re: nfs delay causing broken files Message-ID: <20090206203745.57a035vq2so44ok0@www.site.hu> In-Reply-To: <Pine.GSO.4.63.0902061403440.27692@muncher.cs.uoguelph.ca> References: <Pine.GSO.4.63.0902061403440.27692@muncher.cs.uoguelph.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
Okay, So although it's likely that kernel hack would do it, am I right that a wrapper script with open(...O_DIRECT) would do the job? Basicly i'm creating an file with imagemagick and wanna place that on =20 the nfs server. So I assume if I create the file locally and copy over using a little =20 script that uses open(.. O_DIRECT), it would just work? Application is PHP+imagemagick binary thus pretty high level compared =20 to this stuff, but please let me know if you agree! Thanks Joe Id=E9zet (Rick Macklem <rmacklem@uoguelph.ca>): > 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: > =09if (nfs_directio_enable && (ioflag & IO_DIRECT) && vp->v_type =3D=3D VR= EG) > =09=09return nfs_directio_write(vp, uio, cred, ioflag); > to > =09if (nfs_directio_enable && vp->v_type =3D=3D VREG) > =09=09return 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?20090206203745.57a035vq2so44ok0>