From owner-freebsd-current Sat May 1 6:15:22 1999 Delivered-To: freebsd-current@freebsd.org Received: from opi.flirtbox.ch (unknown [62.48.0.50]) by hub.freebsd.org (Postfix) with SMTP id 06F0614C58 for ; Sat, 1 May 1999 06:15:16 -0700 (PDT) (envelope-from oppermann@pipeline.ch) Received: (qmail 35194 invoked from network); 1 May 1999 13:15:14 -0000 Received: from unknown (HELO pipeline.ch) (195.134.128.41) by opi.flirtbox.ch with SMTP; 1 May 1999 13:15:14 -0000 Message-ID: <372AFE5B.AAA231EA@pipeline.ch> Date: Sat, 01 May 1999 15:15:07 +0200 From: Andre Oppermann X-Mailer: Mozilla 4.03 [en] (WinNT; U) MIME-Version: 1.0 To: dg@root.com Cc: mjacob@feral.com, Greg Lehey , Brad Knowles , FreeBSD current users Subject: Re: Porting Greg Lehey's rawio.c from FreeBSD to Linux... References: <199905010721.AAA25403@implode.root.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG David Greenman wrote: > > >Matthew Jacob wrote: > >> For raw pattern testing Linux has a special challenge since you right > >> directly into the buffer cache. There *is* a BLKFLSBUF ioctl that can try > >> and force a flush but this probably ought to be written to use O_FSYNC- I > >> think that the ll_rw code might use it or an fsync could be done... > > > >Linux' fsync() works only on directories, not on files. > > Huh? That doesn't make any sense. The "f" in fsync() stands for "file". It does write the file to the disk but not the inode. To get the inode on the disk you have to fsync() the directory (which sync'ed the whole FS before 2.0.35). Kinda stupid... If you can't believe it: http://www.ornl.gov/its/archives/mailing-lists/qmail/1998/05/threads.html#00691 Look for Linus' answers. -- Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message