From owner-freebsd-current Sun Sep 20 15:26:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA22112 for freebsd-current-outgoing; Sun, 20 Sep 1998 15:26:07 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA22051 for ; Sun, 20 Sep 1998 15:25:51 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id IAA14238; Mon, 21 Sep 1998 08:25:16 +1000 Date: Mon, 21 Sep 1998 08:25:16 +1000 From: Bruce Evans Message-Id: <199809202225.IAA14238@godzilla.zeta.org.au> To: bde@zeta.org.au, tlambert@primenet.com Subject: Re: pthreads and sync writes Cc: freebsd-current@FreeBSD.ORG, mal@algonet.se Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> >Btw, O_FSYNC isn't documented in open.2. Fsync()ing also seems to >> >be sligtly faster, is this an illusion or is there a difference >> >in the semantics? >> >> O_FSYNC is a no-op in FreeBSD. It probably shouldn't be defined. > >??? > >/sys/kern/vfs_vnops.c:vn_write(): > > if ((fp->f_flag & O_FSYNC) || > (vp->v_mount && (vp->v_mount->mnt_flag & MNT_SYNCHRONOUS))) > ioflag |= IO_SYNC; Oops. So it's no illusion that fsync() is faster. O_FSYNC prevents clustering. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message