Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jul 2011 07:22:20 -0400
From:      Alejandro Imass <ait@p2ee.org>
To:        Unga <unga888@yahoo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to sync a file on FreeBSD?
Message-ID:  <CAHieY7SFftRpK5XN00YTf1ts_QJKNa+qtK5y4d6Sq1LBFfyY-g@mail.gmail.com>
In-Reply-To: <1311317040.38368.YahooMailClassic@web160115.mail.bf1.yahoo.com>
References:  <1311317040.38368.YahooMailClassic@web160115.mail.bf1.yahoo.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
If you used fsync it should write to permanent storage immediately,
and it's no longer the OS' problem. If it's not flushing immediately,
maybe the mystery is at the filesystem level or even hardware, both of
which you didn't provide. When you say 'users' are they looking at the
file via NFS or HTTP? if the latter they could be seeing a cached copy
(proxy, browser, etc.).


On Fri, Jul 22, 2011 at 2:44 AM, Unga <unga888@yahoo.com> wrote:
> Hi all
>
> How to sync a file on FreeBSD (esp. on 8.1) to disk?
>
> I used fsync(2), but does not immediately flush to disk.
>
> I want my writing to a file (a log file) immediately available to other users to read.
>
> Best regards
> Unga
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?CAHieY7SFftRpK5XN00YTf1ts_QJKNa+qtK5y4d6Sq1LBFfyY-g>